]> granicus.if.org Git - php/commitdiff
We no longer need any FETCH's for internal functions
authorZeev Suraski <zeev@php.net>
Thu, 2 Aug 2001 05:49:24 +0000 (05:49 +0000)
committerZeev Suraski <zeev@php.net>
Thu, 2 Aug 2001 05:49:24 +0000 (05:49 +0000)
README.EXT_SKEL
ext/skeleton/create_stubs

index 79640f1560a7a5ce95822de6cef08e6589ed0883..dae5b400983a8913b078852a4589b43a5c6f2d3d 100644 (file)
@@ -154,15 +154,14 @@ PHP_FUNCTION(my_drawtext)
        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 a4bed440f94f41167a3a43dd85256bbe4a282484..5c5c0dc8d8ea67e43c19a0fe4519bfbff9eba8bb 100755 (executable)
@@ -48,9 +48,9 @@ function convert(i, j, t)
                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 @@ END {
                        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"