cvs: php4 / README.EXT_SKEL /ext/skeleton create_stubs
| From: | Zeev Suraski | Date: | Thu, 02 Aug 2001 05:49:24 +0000 |
| Subject: | cvs: php4 / README.EXT_SKEL /ext/skeleton create_stubs | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-6466@lists.php.net to get a copy of this message | ||
zeev Thu Aug 2 01:49:24 2001 EDT
Modified files:
/php4 README.EXT_SKEL
/php4/ext/skeleton create_stubs
Log:
We no longer need any FETCH's for internal functions
Index: php4/README.EXT_SKEL
diff -u php4/README.EXT_SKEL:1.6 php4/README.EXT_SKEL:1.7
--- php4/README.EXT_SKEL:1.6 Thu Aug 2 01:36:49 2001
+++ php4/README.EXT_SKEL Thu Aug 2 01:49:23 2001
@@ -154,15 +154,14 @@
int argc;
int image_id = -1;
int font_id = -1;
- TSRMLS_FETCH();
argc = ZEND_NUM_ARGS();
if (argc < 5 || argc > 6 || zend_get_parameters_ex(argc, &image, &text, &font,
&x, &y, &color) == FAILURE) {
WRONG_PARAM_COUNT;
}
- ZEND_FETCH_RESOURCE(???, ???, image, image_id, "???", ???G());
- ZEND_FETCH_RESOURCE(???, ???, font, font_id, "???", ???G());
+ ZEND_FETCH_RESOURCE(???, ???, image, image_id, "???", ???_rsrc_id);
+ ZEND_FETCH_RESOURCE(???, ???, font, font_id, "???", ???_rsrc_id);
switch (argc) {
case 6:
Index: php4/ext/skeleton/create_stubs
diff -u php4/ext/skeleton/create_stubs:1.12 php4/ext/skeleton/create_stubs:1.13
--- php4/ext/skeleton/create_stubs:1.12 Thu Aug 2 01:36:50 2001
+++ php4/ext/skeleton/create_stubs Thu Aug 2 01:49:24 2001
@@ -48,9 +48,9 @@
if (opt && i > -1) {
resources = resources "\tif (argc < " j+1 ") {\n" \
comment("\t\t/* Argument not given, do something before\n\t\t trying to fetch resource
" name ". */\n") \
- "\t}\n\tZEND_FETCH_RESOURCE(???, ???, " name ext ", " name "_id,
\"???\", ???G());\n"
+ "\t}\n\tZEND_FETCH_RESOURCE(???, ???, " name ext ", " name "_id,
\"???\", ???_rsrc_id);\n"
} else {
- resources = resources "\tZEND_FETCH_RESOURCE(???, ???, " name ext ", " name
"_id, \"???\", ???G());\n"
+ resources = resources "\tZEND_FETCH_RESOURCE(???, ???, " name ext ", " name
"_id, \"???\", ???_rsrc_id);\n"
}
funcvals = funcvals "\tint " name "_id = -1;\n"
} else {
@@ -272,7 +272,6 @@
fetchargs = fetchargs ") == FAILURE)" closefetch
"{\n\t\tZEND_WRONG_PARAM_COUNT();\n\t}\n"
}
if (assign_params) funcvals = ints doubles floats strings
- if (resources) funcvals = funcvals "\tTSRMLS_FETCH();\n"
if (useswitch[i]) {
if (check_argc_in_switch[i]) {
check_argc = "\t\tdefault:\n\t\t\tZEND_WRONG_PARAM_COUNT();\n"