Changeset c4ba74d for perlglue.xs
- Timestamp:
- Aug 21, 2008, 12:52:04 AM (16 years ago)
- Branches:
- master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 38a7f22
- Parents:
- aef51f8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perlglue.xs
racb13bb rc4ba74d 17 17 ************************************************************* 18 18 * These functions, when they are intended to be user-visible, 19 * are document in perlwrap.pm. If you add functions to this19 * are documented in perlwrap.pm. If you add functions to this 20 20 * file, add the appropriate documentation there! 21 21 * … … 33 33 34 34 char * 35 command(cmd )35 command(cmd, ...) 36 36 char *cmd 37 37 PREINIT: 38 38 char *rv = NULL; 39 CODE: 40 rv = owl_function_command(cmd); 41 RETVAL = rv; 39 char **argv; 40 int i; 41 CODE: 42 { 43 if (items == 1) { 44 rv = owl_function_command(cmd); 45 } else { 46 argv = owl_malloc((items + 1) * sizeof *argv); 47 argv[0] = cmd; 48 for(i = 1; i < items; i++) { 49 argv[i] = SvPV_nolen(ST(i)); 50 } 51 rv = owl_function_command_argv(argv, items); 52 owl_free(argv); 53 } 54 RETVAL = rv; 55 } 42 56 OUTPUT: 43 57 RETVAL
Note: See TracChangeset
for help on using the changeset viewer.