/[emacs]/emacs/src/data.c
ViewVC logotype

Diff of /emacs/src/data.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.210.2.13 by miles, Sat Sep 4 09:19:27 2004 UTC revision 1.210.2.14 by miles, Sat Sep 4 09:20:09 2004 UTC
# Line 92  Lisp_Object Qinteger; Line 92  Lisp_Object Qinteger;
92  static Lisp_Object Qsymbol, Qstring, Qcons, Qmarker, Qoverlay;  static Lisp_Object Qsymbol, Qstring, Qcons, Qmarker, Qoverlay;
93  static Lisp_Object Qfloat, Qwindow_configuration, Qwindow;  static Lisp_Object Qfloat, Qwindow_configuration, Qwindow;
94  Lisp_Object Qprocess;  Lisp_Object Qprocess;
95  static Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector;  static Lisp_Object Qcompiled_function, Qfunction_vector, Qbuffer, Qframe, Qvector;
96  static Lisp_Object Qchar_table, Qbool_vector, Qhash_table;  static Lisp_Object Qchar_table, Qbool_vector, Qhash_table;
97  static Lisp_Object Qsubrp, Qmany, Qunevalled;  static Lisp_Object Qsubrp, Qmany, Qunevalled;
98    
# Line 231  for example, (type-of 1) returns `intege Line 231  for example, (type-of 1) returns `intege
231          return Qwindow;          return Qwindow;
232        if (GC_SUBRP (object))        if (GC_SUBRP (object))
233          return Qsubr;          return Qsubr;
234        if (GC_COMPILEDP (object))        if (GC_FUNVECP (object))
235          return Qcompiled_function;          if (FUNVEC_COMPILED_P (object))
236              return Qcompiled_function;
237            else
238              return Qfunction_vector;
239        if (GC_BUFFERP (object))        if (GC_BUFFERP (object))
240          return Qbuffer;          return Qbuffer;
241        if (GC_CHAR_TABLE_P (object))        if (GC_CHAR_TABLE_P (object))
# Line 444  DEFUN ("byte-code-function-p", Fbyte_cod Line 447  DEFUN ("byte-code-function-p", Fbyte_cod
447    return Qnil;    return Qnil;
448  }  }
449    
450    DEFUN ("funvecp", Ffunvecp, Sfunvecp, 1, 1, 0,
451           doc: /* Return t if OBJECT is a `function vector' object.  */)
452         (object)
453         Lisp_Object object;
454    {
455      return FUNVECP (object) ? Qt : Qnil;
456    }
457    
458  DEFUN ("char-or-string-p", Fchar_or_string_p, Schar_or_string_p, 1, 1, 0,  DEFUN ("char-or-string-p", Fchar_or_string_p, Schar_or_string_p, 1, 1, 0,
459         doc: /* Return t if OBJECT is a character (an integer) or a string.  */)         doc: /* Return t if OBJECT is a character (an integer) or a string.  */)
460       (object)       (object)
# Line 2040  or a byte-code object.  IDX starts at 0. Line 2051  or a byte-code object.  IDX starts at 0.
2051      {      {
2052        int size = 0;        int size = 0;
2053        if (VECTORP (array))        if (VECTORP (array))
2054          size = XVECTOR (array)->size;          size = ASIZE (array);
2055        else if (COMPILEDP (array))        else if (FUNVECP (array))
2056          size = XVECTOR (array)->size & PSEUDOVECTOR_SIZE_MASK;          size = FUNVEC_SIZE (array);
2057        else        else
2058          wrong_type_argument (Qarrayp, array);          wrong_type_argument (Qarrayp, array);
2059    
2060        if (idxval < 0 || idxval >= size)        if (idxval < 0 || idxval >= size)
2061          args_out_of_range (array, idx);          args_out_of_range (array, idx);
2062        return XVECTOR (array)->contents[idxval];        return AREF (array, idxval);
2063      }      }
2064  }  }
2065    
# Line 3212  syms_of_data () Line 3223  syms_of_data ()
3223    Qwindow = intern ("window");    Qwindow = intern ("window");
3224    /* Qsubr = intern ("subr"); */    /* Qsubr = intern ("subr"); */
3225    Qcompiled_function = intern ("compiled-function");    Qcompiled_function = intern ("compiled-function");
3226      Qfunction_vector = intern ("function-vector");
3227    Qbuffer = intern ("buffer");    Qbuffer = intern ("buffer");
3228    Qframe = intern ("frame");    Qframe = intern ("frame");
3229    Qvector = intern ("vector");    Qvector = intern ("vector");
# Line 3231  syms_of_data () Line 3243  syms_of_data ()
3243    staticpro (&Qwindow);    staticpro (&Qwindow);
3244    /* staticpro (&Qsubr); */    /* staticpro (&Qsubr); */
3245    staticpro (&Qcompiled_function);    staticpro (&Qcompiled_function);
3246      staticpro (&Qfunction_vector);
3247    staticpro (&Qbuffer);    staticpro (&Qbuffer);
3248    staticpro (&Qframe);    staticpro (&Qframe);
3249    staticpro (&Qvector);    staticpro (&Qvector);
# Line 3267  syms_of_data () Line 3280  syms_of_data ()
3280    defsubr (&Smarkerp);    defsubr (&Smarkerp);
3281    defsubr (&Ssubrp);    defsubr (&Ssubrp);
3282    defsubr (&Sbyte_code_function_p);    defsubr (&Sbyte_code_function_p);
3283      defsubr (&Sfunvecp);
3284    defsubr (&Schar_or_string_p);    defsubr (&Schar_or_string_p);
3285    defsubr (&Scar);    defsubr (&Scar);
3286    defsubr (&Scdr);    defsubr (&Scdr);

Legend:
Removed from v.1.210.2.13  
changed lines
  Added in v.1.210.2.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26