pike.git
/
src
/
modules
/
Perl
/
perlmod.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/modules/Perl/perlmod.c:1:
-
/* $Id: perlmod.c,v 1.
12
2000/03/
14
21:
33
:
24
leif Exp $ */
+
/* $Id: perlmod.c,v 1.
13
2000/03/
18
21:
12
:
38
leif Exp $ */
#include "builtin_functions.h" #include "global.h" #include "svalue.h" #include "array.h" #include "stralloc.h" #include "interpret.h" #include "module_support.h" #include "threads.h" #include "mapping.h"
pike.git/src/modules/Perl/perlmod.c:664:
if (!hv) error("Interal error: perl_get_av() return NULL.\n"); /* count number of elements in hash */ for(n = 0, hv_iterinit(hv); (he = hv_iternext(hv)); ++n); if (n > THIS->array_size_limit) error("The array is larger than array_size_limit.\n"); arr = allocate_array(n); for(i = 0, hv_iterinit(hv); (he = hv_iternext(hv)); ++i)
-
_sv_to_svalue(hv_
iterkey
(he
, &len
),
-
&(arr->item[i]));
+
_sv_to_svalue(hv_
iterkeysv
(he), &(arr->item[i]));
pop_n_elems(args); push_array(arr); } static void perlmod_array_size_limit(INT32 args) { int i; switch (args) { case 0: break;
pike.git/src/modules/Perl/perlmod.c:748:
/* function(string:int) */ ADD_FUNCTION("array_size",perlmod_array_size, tFunc(tStr,tInt),0); /* function(string:int) */ ADD_FUNCTION("get_array",perlmod_get_whole_array, tFunc(tStr,tArr(tMix)),0); /* function(string:int) */
-
ADD_FUNCTION("get_hash_keys",perlmod_get_
whole
_
array
,
+
ADD_FUNCTION("get_hash_keys",perlmod_get_
hash
_
keys
,
tFunc(tStr,tArr(tMix)),0); #if 0 /* function(string,array:array) */ ADD_FUNCTION("set_array", perlmod_set_whole_array, tFunc(tStr tArr(tMix),tArr(tMix)),0); #endif /* function(void|int:int) */ ADD_FUNCTION("array_size_limit",perlmod_array_size_limit,