]> granicus.if.org Git - php/commitdiff
2nd phase in back-substitution those macro's
authorJeroen van Wolffelaar <jeroen@php.net>
Tue, 25 Sep 2001 22:49:04 +0000 (22:49 +0000)
committerJeroen van Wolffelaar <jeroen@php.net>
Tue, 25 Sep 2001 22:49:04 +0000 (22:49 +0000)
I've got pretty much everything now...

43 files changed:
ext/cpdf/cpdf.c
ext/dba/dba.c
ext/dba/dba_db2.c
ext/dba/dba_db3.c
ext/dba/dba_dbm.c
ext/dba/dba_gdbm.c
ext/dba/dba_ndbm.c
ext/dbx/dbx.c
ext/fbsql/php_fbsql.c
ext/gd/gd.c
ext/hyperwave/hw.c
ext/informix/ifx.ec
ext/interbase/interbase.c
ext/java/java.c
ext/ldap/ldap.c
ext/mbstring/mbstring.c
ext/mcrypt/mcrypt.c
ext/ming/ming.c
ext/mnogosearch/php_mnogo.c
ext/msql/php_msql.c
ext/mysql/php_mysql.c
ext/oci8/oci8.c
ext/oracle/oracle.c
ext/ovrimos/ovrimos.c
ext/pfpro/pfpro.c
ext/rpc/java/java.c
ext/rpc/xmlrpc/xmlrpc-epi-php.c
ext/satellite/enum.c
ext/satellite/object.c
ext/satellite/struct.c
ext/snmp/snmp.c
ext/snmp/winsnmp.c
ext/sockets/sockets.c
ext/standard/datetime.c
ext/standard/formatted_print.c
ext/standard/info.c
ext/standard/levenshtein.c
ext/standard/mail.c
ext/standard/quot_print.c
ext/standard/string.c
ext/xml/xml.c
ext/xmlrpc/xmlrpc-epi-php.c
ext/zlib/zlib.c

index d5d866a8050f30b18dfeeab56e92a92330c96a92..b453b614343ff43f2aec8943c16cd53d01a9b1b4 100644 (file)
@@ -230,7 +230,7 @@ PHP_FUNCTION(cpdf_global_set_document_limits)
        convert_to_long(argv[3]);
        convert_to_long(argv[4]);
 
-       cpdf_setGlobalDocumentLimits(argv[0]->value.lval, argv[1]->value.lval, argv[2]->value.lval, argv[3]->value.lval, argv[4]->value.lval);
+       cpdf_setGlobalDocumentLimits(Z_LVAL_P(argv[0]), Z_LVAL_P(argv[1]), Z_LVAL_P(argv[2]), Z_LVAL_P(argv[3]), Z_LVAL_P(argv[4]));
 
        RETURN_TRUE;
 }
@@ -250,14 +250,14 @@ PHP_FUNCTION(cpdf_set_creator)
 
        convert_to_long(arg1);
        convert_to_string(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if (!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d (type=%d)", id, type);
                RETURN_FALSE;
        }
 
-       cpdf_setCreator(pdf, arg2->value.str.val);
+       cpdf_setCreator(pdf, Z_STRVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -277,14 +277,14 @@ PHP_FUNCTION(cpdf_set_title)
 
        convert_to_long(arg1);
        convert_to_string(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if (!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d (type=%d)", id, type);
                RETURN_FALSE;
        }
 
-       cpdf_setTitle(pdf, arg2->value.str.val);
+       cpdf_setTitle(pdf, Z_STRVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -305,14 +305,14 @@ PHP_FUNCTION(cpdf_set_subject)
 
        convert_to_long(arg1);
        convert_to_string(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if (!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d (type=%d)", id, type);
                RETURN_FALSE;
        }
 
-       cpdf_setSubject(pdf, arg2->value.str.val);
+       cpdf_setSubject(pdf, Z_STRVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -332,14 +332,14 @@ PHP_FUNCTION(cpdf_set_keywords)
 
        convert_to_long(arg1);
        convert_to_string(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if (!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d (type=%d)", id, type);
                RETURN_FALSE;
        }
 
-       cpdf_setKeywords(pdf, arg2->value.str.val);
+       cpdf_setKeywords(pdf, Z_STRVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -372,42 +372,42 @@ PHP_FUNCTION(cpdf_set_viewer_preferences)
                RETURN_FALSE;
        }
 
-       if (zend_hash_find (arg2->value.ht, "pagemode", sizeof ("pagemode"), (void **) &zvalue) == SUCCESS)
+       if (zend_hash_find (Z_ARRVAL_P(arg2), "pagemode", sizeof ("pagemode"), (void **) &zvalue) == SUCCESS)
        {
                convert_to_long_ex (zvalue);
                vP.pageMode = Z_LVAL_PP (zvalue);
        }
-       if (zend_hash_find (arg2->value.ht, "hidetoolbar", sizeof ("hidetoolbar"), (void **) &zvalue) == SUCCESS)
+       if (zend_hash_find (Z_ARRVAL_P(arg2), "hidetoolbar", sizeof ("hidetoolbar"), (void **) &zvalue) == SUCCESS)
        {
                convert_to_long_ex (zvalue);
                vP.hideToolbar = Z_LVAL_PP (zvalue);
        }
-       if (zend_hash_find (arg2->value.ht, "hidemenubar", sizeof ("hidemenubar"), (void **) &zvalue) == SUCCESS)
+       if (zend_hash_find (Z_ARRVAL_P(arg2), "hidemenubar", sizeof ("hidemenubar"), (void **) &zvalue) == SUCCESS)
        {
                convert_to_long_ex (zvalue);
                vP.hideMenubar = Z_LVAL_PP (zvalue);
        }
-       if (zend_hash_find (arg2->value.ht, "hidewindowui", sizeof ("hidewindowui"), (void **) &zvalue) == SUCCESS)
+       if (zend_hash_find (Z_ARRVAL_P(arg2), "hidewindowui", sizeof ("hidewindowui"), (void **) &zvalue) == SUCCESS)
        {
                convert_to_long_ex (zvalue);
                vP.hideWindowUI = Z_LVAL_PP (zvalue);
        }
-       if (zend_hash_find (arg2->value.ht, "fitwindow", sizeof ("fitwindow"), (void **) &zvalue) == SUCCESS)
+       if (zend_hash_find (Z_ARRVAL_P(arg2), "fitwindow", sizeof ("fitwindow"), (void **) &zvalue) == SUCCESS)
        {
                convert_to_long_ex (zvalue);
                vP.fitWindow = Z_LVAL_PP (zvalue);
        }
-       if (zend_hash_find (arg2->value.ht, "centerwindow", sizeof ("centerwindow"), (void **) &zvalue) == SUCCESS)
+       if (zend_hash_find (Z_ARRVAL_P(arg2), "centerwindow", sizeof ("centerwindow"), (void **) &zvalue) == SUCCESS)
        {
                convert_to_long_ex (zvalue);
                vP.centerWindow = Z_LVAL_PP (zvalue);
        }
-       if (zend_hash_find (arg2->value.ht, "pagelayout", sizeof ("pagelayout"), (void **) &zvalue) == SUCCESS)
+       if (zend_hash_find (Z_ARRVAL_P(arg2), "pagelayout", sizeof ("pagelayout"), (void **) &zvalue) == SUCCESS)
        {
                convert_to_long_ex (zvalue);
                vP.pageLayout = Z_LVAL_PP (zvalue);
        }
-       if (zend_hash_find (arg2->value.ht, "nonfspagemode", sizeof ("nonfspagemode"), (void **) &zvalue) == SUCCESS)
+       if (zend_hash_find (Z_ARRVAL_P(arg2), "nonfspagemode", sizeof ("nonfspagemode"), (void **) &zvalue) == SUCCESS)
        {
                convert_to_long_ex (zvalue);
                vP.nonFSPageMode = Z_LVAL_PP (zvalue);
@@ -453,7 +453,7 @@ PHP_FUNCTION(cpdf_open)
        cpdf = cpdf_open(0, NULL);
        if(!cpdf)
                RETURN_FALSE;
-       if(arg1->value.lval == 1)
+       if(Z_LVAL_P(arg1) == 1)
                cpdf_enableCompression(cpdf, YES);
        else
                cpdf_enableCompression(cpdf, NO);
@@ -461,10 +461,10 @@ PHP_FUNCTION(cpdf_open)
        if(argc > 1) {
                convert_to_string(arg2);
 #if APACHE
-               if(strcmp(arg2->value.str.val, "-") == 0)
+               if(strcmp(Z_STRVAL_P(arg2), "-") == 0)
                        php_error(E_WARNING, "Writing to stdout as described in the ClibPDF manual is not possible if php is used as an Apache module. Write to a memory stream and use cpdf_output_buffer() instead.");
 #endif
-               cpdf_setOutputFilename(cpdf, arg2->value.str.val);
+               cpdf_setOutputFilename(cpdf, Z_STRVAL_P(arg2));
        }
        cpdf_init(cpdf);
 
@@ -486,7 +486,7 @@ PHP_FUNCTION(cpdf_close)
        }
 
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -520,11 +520,11 @@ PHP_FUNCTION(cpdf_page_init)
        convert_to_long(argv[2]);
        convert_to_long(argv[3]);
        convert_to_long(argv[4]);
-       id=argv[0]->value.lval;
-       pagenr=argv[1]->value.lval;
-       orientation=argv[2]->value.lval;
-       height = argv[3]->value.lval;
-       width = argv[4]->value.lval;
+       id=Z_LVAL_P(argv[0]);
+       pagenr=Z_LVAL_P(argv[1]);
+       orientation=Z_LVAL_P(argv[2]);
+       height = Z_LVAL_P(argv[3]);
+       width = Z_LVAL_P(argv[4]);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -533,8 +533,8 @@ PHP_FUNCTION(cpdf_page_init)
 
        if(argc > 5) {
                convert_to_double(argv[5]);
-               if(argv[5]->value.dval > 0.0)
-                       cpdf_setDefaultDomainUnit(pdf, argv[5]->value.dval);
+               if(Z_DVAL_P(argv[5]) > 0.0)
+                       cpdf_setDefaultDomainUnit(pdf, Z_DVAL_P(argv[5]));
        }
        snprintf(buffer, BUFFERLEN, "0 0 %d %d", width, height);
        cpdf_pageInit(pdf, pagenr, orientation, buffer, buffer);
@@ -558,8 +558,8 @@ PHP_FUNCTION(cpdf_finalize_page)
 
        convert_to_long(arg1);
        convert_to_long(arg2);
-       id=arg1->value.lval;
-       pagenr=arg2->value.lval;
+       id=Z_LVAL_P(arg1);
+       pagenr=Z_LVAL_P(arg2);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -586,8 +586,8 @@ PHP_FUNCTION(cpdf_set_current_page)
 
        convert_to_long(arg1);
        convert_to_long(arg2);
-       id=arg1->value.lval;
-       pagenr=arg2->value.lval;
+       id=Z_LVAL_P(arg1);
+       pagenr=Z_LVAL_P(arg2);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -613,7 +613,7 @@ PHP_FUNCTION(cpdf_begin_text)
        }
 
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -639,7 +639,7 @@ PHP_FUNCTION(cpdf_end_text)
        }
 
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -666,14 +666,14 @@ PHP_FUNCTION(cpdf_show)
 
        convert_to_long(arg1);
        convert_to_string(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       cpdf_textShow(pdf, arg2->value.str.val);
+       cpdf_textShow(pdf, Z_STRVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -697,7 +697,7 @@ PHP_FUNCTION(cpdf_show_xy)
        convert_to_string(argv[1]);
        convert_to_double(argv[2]);
        convert_to_double(argv[3]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -706,12 +706,12 @@ PHP_FUNCTION(cpdf_show_xy)
 
        if(argc == 5) {
                convert_to_long(argv[4]);
-               mode = argv[4]->value.lval;
+               mode = Z_LVAL_P(argv[4]);
        }
        if(mode == 1)
-               cpdf_rawText(pdf, (float) argv[2]->value.dval, (float) argv[3]->value.dval, 0.0, argv[1]->value.str.val);
+               cpdf_rawText(pdf, (float) Z_DVAL_P(argv[2]), (float) Z_DVAL_P(argv[3]), 0.0, Z_STRVAL_P(argv[1]));
        else
-               cpdf_text(pdf, (float) argv[2]->value.dval, (float) argv[3]->value.dval, 0.0, argv[1]->value.str.val);
+               cpdf_text(pdf, (float) Z_DVAL_P(argv[2]), (float) Z_DVAL_P(argv[3]), 0.0, Z_STRVAL_P(argv[1]));
 
        RETURN_TRUE;
 }
@@ -731,14 +731,14 @@ PHP_FUNCTION(cpdf_continue_text)
 
        convert_to_long(arg1);
        convert_to_string(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       cpdf_textCRLFshow(pdf, arg2->value.str.val);
+       cpdf_textCRLFshow(pdf, Z_STRVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -758,7 +758,7 @@ PHP_FUNCTION(cpdf_text)
 
        convert_to_long(argv[0]);
        convert_to_string(argv[1]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -767,48 +767,48 @@ PHP_FUNCTION(cpdf_text)
 
        if(argc > 4) {
                convert_to_long(argv[4]);
-               mode = argv[2]->value.lval;
+               mode = Z_LVAL_P(argv[2]);
        }
        switch(argc) {
                case 2:
-                       cpdf_textShow(pdf, argv[1]->value.str.val);
+                       cpdf_textShow(pdf, Z_STRVAL_P(argv[1]));
                        break;
                case 4:
                        convert_to_double(argv[2]);
                        convert_to_double(argv[3]);
-                       cpdf_text(pdf, (float) argv[2]->value.dval,
-                                 (float) argv[3]->value.dval,
+                       cpdf_text(pdf, (float) Z_DVAL_P(argv[2]),
+                                 (float) Z_DVAL_P(argv[3]),
                                   0.0,
-                                  argv[1]->value.str.val);
+                                  Z_STRVAL_P(argv[1]));
                        break;
                case 5:
                        convert_to_double(argv[2]);
                        convert_to_double(argv[3]);
                        if(mode == 1)
-                               cpdf_rawText(pdf, (float) argv[2]->value.dval,
-                                       (float) argv[3]->value.dval,
+                               cpdf_rawText(pdf, (float) Z_DVAL_P(argv[2]),
+                                       (float) Z_DVAL_P(argv[3]),
                                        0.0,
-                                       argv[1]->value.str.val);
+                                       Z_STRVAL_P(argv[1]));
                        else
-                               cpdf_text(pdf, (float) argv[2]->value.dval,
-                                         (float) argv[3]->value.dval,
+                               cpdf_text(pdf, (float) Z_DVAL_P(argv[2]),
+                                         (float) Z_DVAL_P(argv[3]),
                                          0.0,
-                                         argv[1]->value.str.val);
+                                         Z_STRVAL_P(argv[1]));
                        break;
                case 6:
                        convert_to_double(argv[2]);
                        convert_to_double(argv[3]);
                        convert_to_double(argv[5]);
                        if(mode == 1)
-                               cpdf_rawText(pdf, (float) argv[2]->value.dval,
-                                       (float) argv[3]->value.dval,
-                                       (float) argv[5]->value.dval,
-                                       argv[1]->value.str.val);
+                               cpdf_rawText(pdf, (float) Z_DVAL_P(argv[2]),
+                                       (float) Z_DVAL_P(argv[3]),
+                                       (float) Z_DVAL_P(argv[5]),
+                                       Z_STRVAL_P(argv[1]));
                        else
-                               cpdf_text(pdf, (float) argv[2]->value.dval,
-                                       (float) argv[3]->value.dval,
-                                       (float) argv[5]->value.dval,
-                                       argv[1]->value.str.val);
+                               cpdf_text(pdf, (float) Z_DVAL_P(argv[2]),
+                                       (float) Z_DVAL_P(argv[3]),
+                                       (float) Z_DVAL_P(argv[5]),
+                                       Z_STRVAL_P(argv[1]));
                        break;
                case 7:
                        convert_to_double(argv[2]);
@@ -816,17 +816,17 @@ PHP_FUNCTION(cpdf_text)
                        convert_to_double(argv[5]);
                        convert_to_long(argv[6]);
                        if(mode == 1)
-                               cpdf_rawTextAligned(pdf, (float) argv[2]->value.dval,
-                                       (float) argv[3]->value.dval,
-                                       (float) argv[5]->value.dval,
-                                       argv[6]->value.lval,
-                                       argv[1]->value.str.val);
+                               cpdf_rawTextAligned(pdf, (float) Z_DVAL_P(argv[2]),
+                                       (float) Z_DVAL_P(argv[3]),
+                                       (float) Z_DVAL_P(argv[5]),
+                                       Z_LVAL_P(argv[6]),
+                                       Z_STRVAL_P(argv[1]));
                        else
-                               cpdf_textAligned(pdf, (float) argv[2]->value.dval,
-                                       (float) argv[3]->value.dval,
-                                       (float) argv[5]->value.dval,
-                                       argv[6]->value.lval,
-                                       argv[1]->value.str.val);
+                               cpdf_textAligned(pdf, (float) Z_DVAL_P(argv[2]),
+                                       (float) Z_DVAL_P(argv[3]),
+                                       (float) Z_DVAL_P(argv[5]),
+                                       Z_LVAL_P(argv[6]),
+                                       Z_STRVAL_P(argv[1]));
                        break;
        }
 
@@ -850,19 +850,19 @@ PHP_FUNCTION(cpdf_set_font)
        convert_to_string(arg2);
        convert_to_double(arg3);
        convert_to_string(arg4);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
        
-/*     if(arg4->value.lval > 6) {
+/*     if(Z_LVAL_P(arg4) > 6) {
                php_error(E_WARNING, "Font encoding set to 5");
-               arg4->value.lval = 5;
+               Z_LVAL_P(arg4) = 5;
        }
 */
-       cpdf_setFont(pdf, arg2->value.str.val, arg4->value.str.val, (float) arg3->value.dval);
+       cpdf_setFont(pdf, Z_STRVAL_P(arg2), Z_STRVAL_P(arg4), (float) Z_DVAL_P(arg3));
 
        RETURN_TRUE;
 }
@@ -883,14 +883,14 @@ PHP_FUNCTION(cpdf_set_font_directories)
        convert_to_long(arg1);
        convert_to_string(arg2);
        convert_to_string(arg3);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       cpdf_setFontDirectories(pdf, arg2->value.str.val, arg3->value.str.val);
+       cpdf_setFontDirectories(pdf, Z_STRVAL_P(arg2), Z_STRVAL_P(arg3));
 
        RETURN_TRUE;
 }
@@ -910,14 +910,14 @@ PHP_FUNCTION(cpdf_set_font_map_file)
 
        convert_to_long(arg1);
        convert_to_string(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       cpdf_setFontMapFile(pdf, arg2->value.str.val);
+       cpdf_setFontMapFile(pdf, Z_STRVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -937,14 +937,14 @@ PHP_FUNCTION(cpdf_set_leading)
 
        convert_to_long(arg1);
        convert_to_double(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
        
-       cpdf_setTextLeading(pdf, (float) arg2->value.dval);
+       cpdf_setTextLeading(pdf, (float) Z_DVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -964,14 +964,14 @@ PHP_FUNCTION(cpdf_set_text_rendering)
 
        convert_to_long(arg1);
        convert_to_long(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
        
-       cpdf_setTextRenderingMode(pdf, arg2->value.lval);
+       cpdf_setTextRenderingMode(pdf, Z_LVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -991,14 +991,14 @@ PHP_FUNCTION(cpdf_set_horiz_scaling)
 
        convert_to_long(arg1);
        convert_to_double(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
        
-       cpdf_setHorizontalScaling(pdf, (float) arg2->value.dval * 100.0);
+       cpdf_setHorizontalScaling(pdf, (float) Z_DVAL_P(arg2) * 100.0);
 
        RETURN_TRUE;
 }
@@ -1018,14 +1018,14 @@ PHP_FUNCTION(cpdf_set_text_rise)
 
        convert_to_long(arg1);
        convert_to_double(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
        
-       cpdf_setTextRise(pdf, (float) arg2->value.dval);
+       cpdf_setTextRise(pdf, (float) Z_DVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -1048,8 +1048,8 @@ PHP_FUNCTION(cpdf_set_text_matrix)
 
        convert_to_long(arg1);
        convert_to_array(arg2);
-       id=arg1->value.lval;
-       matrix=arg2->value.ht;
+       id=Z_LVAL_P(arg1);
+       matrix=Z_ARRVAL_P(arg2);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -1101,7 +1101,7 @@ PHP_FUNCTION(cpdf_set_text_pos)
        convert_to_long(argv[0]);
        convert_to_double(argv[1]);
        convert_to_double(argv[2]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -1110,12 +1110,12 @@ PHP_FUNCTION(cpdf_set_text_pos)
        
        if(argc > 3) {
                convert_to_long(argv[3]);
-               mode = argv[3]->value.lval;
+               mode = Z_LVAL_P(argv[3]);
        }
        if(mode == 1)
-               cpdf_rawSetTextPosition(pdf, (float) argv[1]->value.dval, (float) argv[2]->value.dval);
+               cpdf_rawSetTextPosition(pdf, (float) Z_DVAL_P(argv[1]), (float) Z_DVAL_P(argv[2]));
        else
-               cpdf_setTextPosition(pdf, (float) argv[1]->value.dval, (float) argv[2]->value.dval);
+               cpdf_setTextPosition(pdf, (float) Z_DVAL_P(argv[1]), (float) Z_DVAL_P(argv[2]));
 
        RETURN_TRUE;
 }
@@ -1135,14 +1135,14 @@ PHP_FUNCTION(cpdf_rotate_text)
 
        convert_to_long(arg1);
        convert_to_double(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       cpdf_rotateText(pdf, (float) arg2->value.dval);
+       cpdf_rotateText(pdf, (float) Z_DVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -1162,14 +1162,14 @@ PHP_FUNCTION(cpdf_set_char_spacing)
 
        convert_to_long(arg1);
        convert_to_double(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       cpdf_setCharacterSpacing(pdf, (float) arg2->value.dval);
+       cpdf_setCharacterSpacing(pdf, (float) Z_DVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -1189,14 +1189,14 @@ PHP_FUNCTION(cpdf_set_word_spacing)
 
        convert_to_long(arg1);
        convert_to_double(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       cpdf_setWordSpacing(pdf, (float) arg2->value.dval);
+       cpdf_setWordSpacing(pdf, (float) Z_DVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -1217,14 +1217,14 @@ PHP_FUNCTION(cpdf_stringwidth)
 
        convert_to_long(arg1);
        convert_to_string(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       width = (double) cpdf_stringWidth(pdf, arg2->value.str.val);
+       width = (double) cpdf_stringWidth(pdf, Z_STRVAL_P(arg2));
 
        RETURN_DOUBLE((double)width);
 }
@@ -1243,7 +1243,7 @@ PHP_FUNCTION(cpdf_save)
        }
 
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -1269,7 +1269,7 @@ PHP_FUNCTION(cpdf_restore)
        }
 
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -1297,14 +1297,14 @@ PHP_FUNCTION(cpdf_translate)
        convert_to_long(arg1);
        convert_to_double(arg2);
        convert_to_double(arg3);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       cpdf_rawTranslate(pdf, (float) arg2->value.dval, (float) arg3->value.dval);
+       cpdf_rawTranslate(pdf, (float) Z_DVAL_P(arg2), (float) Z_DVAL_P(arg3));
 
        RETURN_TRUE;
 }
@@ -1325,14 +1325,14 @@ PHP_FUNCTION(cpdf_scale)
        convert_to_long(arg1);
        convert_to_double(arg2);
        convert_to_double(arg3);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       cpdf_scale(pdf, (float) arg2->value.dval, (float) arg3->value.dval);
+       cpdf_scale(pdf, (float) Z_DVAL_P(arg2), (float) Z_DVAL_P(arg3));
 
        RETURN_TRUE;
 }
@@ -1352,14 +1352,14 @@ PHP_FUNCTION(cpdf_rotate)
 
        convert_to_long(arg1);
        convert_to_double(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       cpdf_rotate(pdf, (float) arg2->value.dval);
+       cpdf_rotate(pdf, (float) Z_DVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -1379,19 +1379,19 @@ PHP_FUNCTION(cpdf_setflat)
 
        convert_to_long(arg1);
        convert_to_double(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       if((arg2->value.lval > 100) && (arg2->value.lval < 0)) {
+       if((Z_LVAL_P(arg2) > 100) && (Z_LVAL_P(arg2) < 0)) {
                php_error(E_WARNING, "Parameter of pdf_setflat() has to between 0 and 100");
                RETURN_FALSE;
        }
 
-       cpdf_setflat(pdf, (int) arg2->value.dval);
+       cpdf_setflat(pdf, (int) Z_DVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -1411,19 +1411,19 @@ PHP_FUNCTION(cpdf_setlinejoin)
 
        convert_to_long(arg1);
        convert_to_long(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       if((arg2->value.lval > 2) && (arg2->value.lval < 0)) {
+       if((Z_LVAL_P(arg2) > 2) && (Z_LVAL_P(arg2) < 0)) {
                php_error(E_WARNING, "Parameter of pdf_setlinejoin() has to between 0 and 2");
                RETURN_FALSE;
        }
 
-       cpdf_setlinejoin(pdf, arg2->value.lval);
+       cpdf_setlinejoin(pdf, Z_LVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -1443,19 +1443,19 @@ PHP_FUNCTION(cpdf_setlinecap)
 
        convert_to_long(arg1);
        convert_to_long(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       if((arg2->value.lval > 2) && (arg2->value.lval < 0)) {
+       if((Z_LVAL_P(arg2) > 2) && (Z_LVAL_P(arg2) < 0)) {
                php_error(E_WARNING, "Parameter of pdf_setlinecap() has to be > 0 and =< 2");
                RETURN_FALSE;
        }
 
-       cpdf_setlinecap(pdf, arg2->value.lval);
+       cpdf_setlinecap(pdf, Z_LVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -1475,19 +1475,19 @@ PHP_FUNCTION(cpdf_setmiterlimit)
 
        convert_to_long(arg1);
        convert_to_double(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       if(arg2->value.dval < 1) {
+       if(Z_DVAL_P(arg2) < 1) {
                php_error(E_WARNING, "Parameter of pdf_setmiterlimit() has to be >= 1");
                RETURN_FALSE;
        }
 
-       cpdf_setmiterlimit(pdf, (float) arg2->value.dval);
+       cpdf_setmiterlimit(pdf, (float) Z_DVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -1507,14 +1507,14 @@ PHP_FUNCTION(cpdf_setlinewidth)
 
        convert_to_long(arg1);
        convert_to_double(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       cpdf_setlinewidth(pdf, (float) arg2->value.dval);
+       cpdf_setlinewidth(pdf, (float) Z_DVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -1537,14 +1537,14 @@ PHP_FUNCTION(cpdf_setdash)
        convert_to_long(arg1);
        convert_to_long(arg2);
        convert_to_long(arg3);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       snprintf(buffer, BUFFERLEN, "[%d %d] 0", (int) arg2->value.lval, (int) arg3->value.lval);
+       snprintf(buffer, BUFFERLEN, "[%d %d] 0", (int) Z_LVAL_P(arg2), (int) Z_LVAL_P(arg3));
        cpdf_setdash(pdf, buffer);
 
        RETURN_TRUE;
@@ -1569,7 +1569,7 @@ PHP_FUNCTION(cpdf_moveto)
        convert_to_long(argv[0]);
        convert_to_double(argv[1]);
        convert_to_double(argv[2]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -1578,12 +1578,12 @@ PHP_FUNCTION(cpdf_moveto)
 
        if(argc > 3) {
                convert_to_long(argv[3]);
-               mode = argv[3]->value.lval;
+               mode = Z_LVAL_P(argv[3]);
        }
        if(mode == 1)
-               cpdf_rawMoveto(pdf, (float) argv[1]->value.dval, (float) argv[2]->value.dval);
+               cpdf_rawMoveto(pdf, (float) Z_DVAL_P(argv[1]), (float) Z_DVAL_P(argv[2]));
        else
-               cpdf_moveto(pdf, (float) argv[1]->value.dval, (float) argv[2]->value.dval);
+               cpdf_moveto(pdf, (float) Z_DVAL_P(argv[1]), (float) Z_DVAL_P(argv[2]));
 
        RETURN_TRUE;
 }
@@ -1606,7 +1606,7 @@ PHP_FUNCTION(cpdf_rmoveto)
        convert_to_long(argv[0]);
        convert_to_double(argv[1]);
        convert_to_double(argv[2]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -1615,12 +1615,12 @@ PHP_FUNCTION(cpdf_rmoveto)
 
        if(argc > 3) {
                convert_to_long(argv[3]);
-               mode = argv[3]->value.lval;
+               mode = Z_LVAL_P(argv[3]);
        }
        if(mode == 1)
-               cpdf_rawRmoveto(pdf, (float) argv[1]->value.dval, (float) argv[2]->value.dval);
+               cpdf_rawRmoveto(pdf, (float) Z_DVAL_P(argv[1]), (float) Z_DVAL_P(argv[2]));
        else
-               cpdf_rmoveto(pdf, (float) argv[1]->value.dval, (float) argv[2]->value.dval);
+               cpdf_rmoveto(pdf, (float) Z_DVAL_P(argv[1]), (float) Z_DVAL_P(argv[2]));
 
        RETURN_TRUE;
 }
@@ -1647,7 +1647,7 @@ PHP_FUNCTION(cpdf_curveto)
        convert_to_double(argv[4]);
        convert_to_double(argv[5]);
        convert_to_double(argv[6]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -1656,22 +1656,22 @@ PHP_FUNCTION(cpdf_curveto)
 
        if(argc > 7) {
                convert_to_long(argv[7]);
-               mode = argv[7]->value.lval;
+               mode = Z_LVAL_P(argv[7]);
        }
        if(mode == 1)
-               cpdf_rawCurveto(pdf, (float) argv[1]->value.dval,
-                               (float) argv[2]->value.dval,
-                               (float) argv[3]->value.dval,
-                               (float) argv[4]->value.dval,
-                               (float) argv[5]->value.dval,
-                               (float) argv[6]->value.dval);
+               cpdf_rawCurveto(pdf, (float) Z_DVAL_P(argv[1]),
+                               (float) Z_DVAL_P(argv[2]),
+                               (float) Z_DVAL_P(argv[3]),
+                               (float) Z_DVAL_P(argv[4]),
+                               (float) Z_DVAL_P(argv[5]),
+                               (float) Z_DVAL_P(argv[6]));
        else
-               cpdf_curveto(pdf, (float) argv[1]->value.dval,
-                               (float) argv[2]->value.dval,
-                               (float) argv[3]->value.dval,
-                               (float) argv[4]->value.dval,
-                               (float) argv[5]->value.dval,
-                               (float) argv[6]->value.dval);
+               cpdf_curveto(pdf, (float) Z_DVAL_P(argv[1]),
+                               (float) Z_DVAL_P(argv[2]),
+                               (float) Z_DVAL_P(argv[3]),
+                               (float) Z_DVAL_P(argv[4]),
+                               (float) Z_DVAL_P(argv[5]),
+                               (float) Z_DVAL_P(argv[6]));
 
        RETURN_TRUE;
 }
@@ -1694,7 +1694,7 @@ PHP_FUNCTION(cpdf_lineto)
        convert_to_long(argv[0]);
        convert_to_double(argv[1]);
        convert_to_double(argv[2]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -1703,12 +1703,12 @@ PHP_FUNCTION(cpdf_lineto)
 
        if(argc > 3) {
                convert_to_long(argv[3]);
-               mode = argv[3]->value.lval;
+               mode = Z_LVAL_P(argv[3]);
        }
        if(mode == 1)
-               cpdf_rawLineto(pdf, (float) argv[1]->value.dval, (float) argv[2]->value.dval);
+               cpdf_rawLineto(pdf, (float) Z_DVAL_P(argv[1]), (float) Z_DVAL_P(argv[2]));
        else
-               cpdf_lineto(pdf, (float) argv[1]->value.dval, (float) argv[2]->value.dval);
+               cpdf_lineto(pdf, (float) Z_DVAL_P(argv[1]), (float) Z_DVAL_P(argv[2]));
 
        RETURN_TRUE;
 }
@@ -1731,7 +1731,7 @@ PHP_FUNCTION(cpdf_rlineto)
        convert_to_long(argv[0]);
        convert_to_double(argv[1]);
        convert_to_double(argv[2]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -1740,12 +1740,12 @@ PHP_FUNCTION(cpdf_rlineto)
 
        if(argc > 3) {
                convert_to_long(argv[3]);
-               mode = argv[3]->value.lval;
+               mode = Z_LVAL_P(argv[3]);
        }
        if(mode == 1)
-               cpdf_rawRlineto(pdf, (float) argv[1]->value.dval, (float) argv[2]->value.dval);
+               cpdf_rawRlineto(pdf, (float) Z_DVAL_P(argv[1]), (float) Z_DVAL_P(argv[2]));
        else
-               cpdf_rlineto(pdf, (float) argv[1]->value.dval, (float) argv[2]->value.dval);
+               cpdf_rlineto(pdf, (float) Z_DVAL_P(argv[1]), (float) Z_DVAL_P(argv[2]));
 
        RETURN_TRUE;
 }
@@ -1769,7 +1769,7 @@ PHP_FUNCTION(cpdf_circle)
        convert_to_double(argv[1]);
        convert_to_double(argv[2]);
        convert_to_double(argv[3]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -1778,12 +1778,12 @@ PHP_FUNCTION(cpdf_circle)
 
        if(argc > 4) {
                convert_to_long(argv[4]);
-               mode = argv[4]->value.lval;
+               mode = Z_LVAL_P(argv[4]);
        }
        if(mode == 1)
-               cpdf_rawCircle(pdf, (float) argv[1]->value.dval, (float) argv[2]->value.dval, (float) argv[3]->value.dval);
+               cpdf_rawCircle(pdf, (float) Z_DVAL_P(argv[1]), (float) Z_DVAL_P(argv[2]), (float) Z_DVAL_P(argv[3]));
        else
-               cpdf_circle(pdf, (float) argv[1]->value.dval, (float) argv[2]->value.dval, (float) argv[3]->value.dval);
+               cpdf_circle(pdf, (float) Z_DVAL_P(argv[1]), (float) Z_DVAL_P(argv[2]), (float) Z_DVAL_P(argv[3]));
 
        RETURN_TRUE;
 }
@@ -1809,7 +1809,7 @@ PHP_FUNCTION(cpdf_arc)
        convert_to_double(argv[3]);
        convert_to_double(argv[4]);
        convert_to_double(argv[5]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -1818,12 +1818,12 @@ PHP_FUNCTION(cpdf_arc)
 
        if(argc > 6) {
                convert_to_long(argv[6]);
-               mode = argv[6]->value.lval;
+               mode = Z_LVAL_P(argv[6]);
        }
        if(mode == 1)
-               cpdf_rawArc(pdf, (float) argv[1]->value.dval, (float) argv[2]->value.dval, (float) argv[3]->value.dval, (float) argv[4]->value.dval, (float) argv[5]->value.dval, 1);
+               cpdf_rawArc(pdf, (float) Z_DVAL_P(argv[1]), (float) Z_DVAL_P(argv[2]), (float) Z_DVAL_P(argv[3]), (float) Z_DVAL_P(argv[4]), (float) Z_DVAL_P(argv[5]), 1);
        else
-               cpdf_arc(pdf, (float) argv[1]->value.dval, (float) argv[2]->value.dval, (float) argv[3]->value.dval, (float) argv[4]->value.dval, (float) argv[5]->value.dval, 1);
+               cpdf_arc(pdf, (float) Z_DVAL_P(argv[1]), (float) Z_DVAL_P(argv[2]), (float) Z_DVAL_P(argv[3]), (float) Z_DVAL_P(argv[4]), (float) Z_DVAL_P(argv[5]), 1);
 
        RETURN_TRUE;
 }
@@ -1848,7 +1848,7 @@ PHP_FUNCTION(cpdf_rect)
        convert_to_double(argv[2]);
        convert_to_double(argv[3]);
        convert_to_double(argv[4]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -1857,18 +1857,18 @@ PHP_FUNCTION(cpdf_rect)
 
        if(argc > 5) {
                convert_to_long(argv[5]);
-               mode = argv[5]->value.lval;
+               mode = Z_LVAL_P(argv[5]);
        }
        if(mode == 1)
-               cpdf_rawRect(pdf, (float) argv[1]->value.dval,
-                               (float) argv[2]->value.dval,
-                               (float) argv[3]->value.dval,
-                               (float) argv[4]->value.dval);
+               cpdf_rawRect(pdf, (float) Z_DVAL_P(argv[1]),
+                               (float) Z_DVAL_P(argv[2]),
+                               (float) Z_DVAL_P(argv[3]),
+                               (float) Z_DVAL_P(argv[4]));
        else
-               cpdf_rect(pdf, (float) argv[1]->value.dval,
-                               (float) argv[2]->value.dval,
-                               (float) argv[3]->value.dval,
-                               (float) argv[4]->value.dval);
+               cpdf_rect(pdf, (float) Z_DVAL_P(argv[1]),
+                               (float) Z_DVAL_P(argv[2]),
+                               (float) Z_DVAL_P(argv[3]),
+                               (float) Z_DVAL_P(argv[4]));
 
        RETURN_TRUE;
 }
@@ -1887,7 +1887,7 @@ PHP_FUNCTION(cpdf_newpath)
        }
 
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -1913,7 +1913,7 @@ PHP_FUNCTION(cpdf_closepath)
        }
 
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -1939,7 +1939,7 @@ PHP_FUNCTION(cpdf_closepath_stroke)
        }
 
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -1966,7 +1966,7 @@ PHP_FUNCTION(cpdf_stroke)
        }
 
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -1992,7 +1992,7 @@ PHP_FUNCTION(cpdf_fill)
        }
 
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -2018,7 +2018,7 @@ PHP_FUNCTION(cpdf_fill_stroke)
        }
 
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -2045,7 +2045,7 @@ PHP_FUNCTION(cpdf_closepath_fill_stroke)
        }
 
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -2073,7 +2073,7 @@ PHP_FUNCTION(cpdf_clip)
        }
 
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -2100,14 +2100,14 @@ PHP_FUNCTION(cpdf_setgray_fill)
 
        convert_to_long(arg1);
        convert_to_double(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       cpdf_setgrayFill(pdf, (float) arg2->value.dval);
+       cpdf_setgrayFill(pdf, (float) Z_DVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -2127,14 +2127,14 @@ PHP_FUNCTION(cpdf_setgray_stroke)
 
        convert_to_long(arg1);
        convert_to_double(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       cpdf_setgrayStroke(pdf, (float) arg2->value.dval);
+       cpdf_setgrayStroke(pdf, (float) Z_DVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -2154,14 +2154,14 @@ PHP_FUNCTION(cpdf_setgray)
 
        convert_to_long(arg1);
        convert_to_double(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       cpdf_setgray(pdf, (float) arg2->value.dval);
+       cpdf_setgray(pdf, (float) Z_DVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -2183,14 +2183,14 @@ PHP_FUNCTION(cpdf_setrgbcolor_fill)
        convert_to_double(arg2);
        convert_to_double(arg3);
        convert_to_double(arg4);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       cpdf_setrgbcolorFill(pdf, (float) arg2->value.dval, (float) arg3->value.dval, (float) arg4->value.dval);
+       cpdf_setrgbcolorFill(pdf, (float) Z_DVAL_P(arg2), (float) Z_DVAL_P(arg3), (float) Z_DVAL_P(arg4));
 
        RETURN_TRUE;
 }
@@ -2212,14 +2212,14 @@ PHP_FUNCTION(cpdf_setrgbcolor_stroke)
        convert_to_double(arg2);
        convert_to_double(arg3);
        convert_to_double(arg4);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       cpdf_setrgbcolorStroke(pdf, (float) arg2->value.dval, (float) arg3->value.dval, (float) arg4->value.dval);
+       cpdf_setrgbcolorStroke(pdf, (float) Z_DVAL_P(arg2), (float) Z_DVAL_P(arg3), (float) Z_DVAL_P(arg4));
 
        RETURN_TRUE;
 }
@@ -2241,14 +2241,14 @@ PHP_FUNCTION(cpdf_setrgbcolor)
        convert_to_double(arg2);
        convert_to_double(arg3);
        convert_to_double(arg4);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       cpdf_setrgbcolor(pdf, (float) arg2->value.dval, (float) arg3->value.dval, (float) arg4->value.dval);
+       cpdf_setrgbcolor(pdf, (float) Z_DVAL_P(arg2), (float) Z_DVAL_P(arg3), (float) Z_DVAL_P(arg4));
 
        RETURN_TRUE;
 }
@@ -2272,15 +2272,15 @@ PHP_FUNCTION(cpdf_set_page_animation)
        convert_to_double(arg4);
        convert_to_long(arg5);
        convert_to_long(arg6);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       cpdf_setPageTransition(pdf, arg2->value.lval, arg3->value.dval, arg4->value.dval,
-                              arg5->value.lval, arg6->value.lval);
+       cpdf_setPageTransition(pdf, Z_LVAL_P(arg2), Z_DVAL_P(arg3), Z_DVAL_P(arg4),
+                              Z_LVAL_P(arg5), Z_LVAL_P(arg6));
 
        RETURN_TRUE;
 }
@@ -2299,7 +2299,7 @@ PHP_FUNCTION(cpdf_finalize)
        }
 
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -2326,7 +2326,7 @@ PHP_FUNCTION(cpdf_output_buffer)
        }
 
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -2355,7 +2355,7 @@ PHP_FUNCTION(cpdf_save_to_file)
 
        convert_to_long(arg1);
        convert_to_string(arg2);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -2363,11 +2363,11 @@ PHP_FUNCTION(cpdf_save_to_file)
        }
 
 #if APACHE
-       if(strcmp(arg2->value.str.val, "-") == 0)
+       if(strcmp(Z_STRVAL_P(arg2), "-") == 0)
                php_error(E_WARNING, "Writing to stdout as described in the ClibPDF manual is not possible if php is used as an Apache module. Use cpdf_output_buffer() instead.");
 #endif
 
-       cpdf_savePDFmemoryStreamToFile(pdf, arg2->value.str.val);
+       cpdf_savePDFmemoryStreamToFile(pdf, Z_STRVAL_P(arg2));
 
        RETURN_TRUE;
 }
@@ -2394,15 +2394,15 @@ PHP_FUNCTION(cpdf_import_jpeg)
        convert_to_double(argv[3]);
        convert_to_double(argv[4]);
        convert_to_double(argv[5]);
-       width = (float) argv[5]->value.dval;
+       width = (float) Z_DVAL_P(argv[5]);
        convert_to_double(argv[6]);
-       height = (float) argv[6]->value.dval;
+       height = (float) Z_DVAL_P(argv[6]);
        convert_to_double(argv[7]);
-       xscale = (float) argv[7]->value.dval;
+       xscale = (float) Z_DVAL_P(argv[7]);
        convert_to_double(argv[8]);
-       yscale = (float) argv[8]->value.dval;
+       yscale = (float) Z_DVAL_P(argv[8]);
        convert_to_long(argv[9]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -2411,30 +2411,30 @@ PHP_FUNCTION(cpdf_import_jpeg)
 
        if(argc > 10) {
                convert_to_long(argv[10]);
-               mode = argv[10]->value.lval;
+               mode = Z_LVAL_P(argv[10]);
        }
        if(mode == 1)
-               cpdf_rawImportImage(pdf, argv[1]->value.str.val,
+               cpdf_rawImportImage(pdf, Z_STRVAL_P(argv[1]),
                                    JPEG_IMG,
-                                   (float) argv[2]->value.dval,
-                                   (float) argv[3]->value.dval,
-                                   (float) argv[4]->value.dval,
+                                   (float) Z_DVAL_P(argv[2]),
+                                   (float) Z_DVAL_P(argv[3]),
+                                   (float) Z_DVAL_P(argv[4]),
                                    &width,
                                    &height,
                                    &xscale,
                                    &yscale,
-                                   argv[9]->value.lval);
+                                   Z_LVAL_P(argv[9]));
        else
-               cpdf_rawImportImage(pdf, argv[1]->value.str.val,
+               cpdf_rawImportImage(pdf, Z_STRVAL_P(argv[1]),
                                    JPEG_IMG,
-                                   (float) argv[2]->value.dval,
-                                   (float) argv[3]->value.dval,
-                                   (float) argv[4]->value.dval,
+                                   (float) Z_DVAL_P(argv[2]),
+                                   (float) Z_DVAL_P(argv[3]),
+                                   (float) Z_DVAL_P(argv[4]),
                                    &width,
                                    &height,
                                    &xscale,
                                    &yscale,
-                                   argv[9]->value.lval);
+                                   Z_LVAL_P(argv[9]));
 
        RETURN_TRUE;
 }
@@ -2466,14 +2466,14 @@ PHP_FUNCTION(cpdf_place_inline_image)
        convert_to_double(argv[5]);
        convert_to_double(argv[6]);
        convert_to_long(argv[7]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       gid=argv[1]->value.lval;
+       gid=Z_LVAL_P(argv[1]);
        im = zend_list_find(gid, &type);
        
        ZEND_GET_RESOURCE_TYPE_ID(CPDF_GLOBAL(le_gd), "gd");
@@ -2489,7 +2489,7 @@ PHP_FUNCTION(cpdf_place_inline_image)
 
        if(argc > 8) {
                convert_to_long(argv[8]);
-               mode = argv[8]->value.lval;
+               mode = Z_LVAL_P(argv[8]);
        }
 
        count = 3 * im->sx * im->sy;
@@ -2508,24 +2508,24 @@ PHP_FUNCTION(cpdf_place_inline_image)
 
        if(mode == 1)
                cpdf_placeInLineImage(pdf, buffer, count,
-                                   (float) argv[2]->value.dval,
-                                   (float) argv[3]->value.dval,
-                                   (float) argv[4]->value.dval,
-                                   (float) argv[5]->value.dval,
-                                   (float) argv[6]->value.dval,
+                                   (float) Z_DVAL_P(argv[2]),
+                                   (float) Z_DVAL_P(argv[3]),
+                                   (float) Z_DVAL_P(argv[4]),
+                                   (float) Z_DVAL_P(argv[5]),
+                                   (float) Z_DVAL_P(argv[6]),
                                    im->sx,
                                    im->sy,
-                                   8, 2, argv[7]->value.lval);
+                                   8, 2, Z_LVAL_P(argv[7]));
        else
                cpdf_rawPlaceInLineImage(pdf, buffer, count,
-                                   (float) argv[2]->value.dval,
-                                   (float) argv[3]->value.dval,
-                                   (float) argv[4]->value.dval,
-                                   (float) argv[5]->value.dval,
-                                   (float) argv[6]->value.dval,
+                                   (float) Z_DVAL_P(argv[2]),
+                                   (float) Z_DVAL_P(argv[3]),
+                                   (float) Z_DVAL_P(argv[4]),
+                                   (float) Z_DVAL_P(argv[5]),
+                                   (float) Z_DVAL_P(argv[6]),
                                    im->sx,
                                    im->sy,
-                                   8, 2, argv[7]->value.lval);
+                                   8, 2, Z_LVAL_P(argv[7]));
 
        efree(buffer);
        RETURN_TRUE;
@@ -2555,7 +2555,7 @@ PHP_FUNCTION(cpdf_add_annotation)
        convert_to_double(argv[4]);
        convert_to_string(argv[5]);
        convert_to_string(argv[6]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -2570,23 +2570,23 @@ PHP_FUNCTION(cpdf_add_annotation)
        attrib.b = 1.00;
        if(argc > 7) {
                convert_to_long(argv[7]);
-               mode = argv[7]->value.lval;
+               mode = Z_LVAL_P(argv[7]);
        }
        if(mode == 1)
-               cpdf_rawSetAnnotation(pdf, (float) argv[1]->value.dval,
-                                   (float) argv[2]->value.dval,
-                                   (float) argv[3]->value.dval,
-                                   (float) argv[4]->value.dval,
-                                   argv[5]->value.str.val,
-                                   argv[6]->value.str.val,
+               cpdf_rawSetAnnotation(pdf, (float) Z_DVAL_P(argv[1]),
+                                   (float) Z_DVAL_P(argv[2]),
+                                   (float) Z_DVAL_P(argv[3]),
+                                   (float) Z_DVAL_P(argv[4]),
+                                   Z_STRVAL_P(argv[5]),
+                                   Z_STRVAL_P(argv[6]),
                                    &attrib);
        else
-               cpdf_setAnnotation(pdf, (float) argv[1]->value.dval,
-                                   (float) argv[2]->value.dval,
-                                   (float) argv[3]->value.dval,
-                                   (float) argv[4]->value.dval,
-                                   argv[5]->value.str.val,
-                                   argv[6]->value.str.val,
+               cpdf_setAnnotation(pdf, (float) Z_DVAL_P(argv[1]),
+                                   (float) Z_DVAL_P(argv[2]),
+                                   (float) Z_DVAL_P(argv[3]),
+                                   (float) Z_DVAL_P(argv[4]),
+                                   Z_STRVAL_P(argv[5]),
+                                   Z_STRVAL_P(argv[6]),
                                    &attrib);
 
        RETURN_TRUE;
@@ -2614,7 +2614,7 @@ PHP_FUNCTION(cpdf_set_action_url)
        convert_to_double(argv[3]);
        convert_to_double(argv[4]);
        convert_to_string(argv[5]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
@@ -2629,21 +2629,21 @@ PHP_FUNCTION(cpdf_set_action_url)
        attrib.b = 1.00;
        if(argc > 6) {
                convert_to_long(argv[6]);
-               mode = argv[6]->value.lval;
+               mode = Z_LVAL_P(argv[6]);
        }
        if(mode == 1)
-               cpdf_rawSetActionURL(pdf, (float) argv[1]->value.dval,
-                                   (float) argv[2]->value.dval,
-                                   (float) argv[3]->value.dval,
-                                   (float) argv[4]->value.dval,
-                                   argv[5]->value.str.val,
+               cpdf_rawSetActionURL(pdf, (float) Z_DVAL_P(argv[1]),
+                                   (float) Z_DVAL_P(argv[2]),
+                                   (float) Z_DVAL_P(argv[3]),
+                                   (float) Z_DVAL_P(argv[4]),
+                                   Z_STRVAL_P(argv[5]),
                                    &attrib);
        else
-               cpdf_setActionURL(pdf, (float) argv[1]->value.dval,
-                                   (float) argv[2]->value.dval,
-                                   (float) argv[3]->value.dval,
-                                   (float) argv[4]->value.dval,
-                                   argv[5]->value.str.val,
+               cpdf_setActionURL(pdf, (float) Z_DVAL_P(argv[1]),
+                                   (float) Z_DVAL_P(argv[2]),
+                                   (float) Z_DVAL_P(argv[3]),
+                                   (float) Z_DVAL_P(argv[4]),
+                                   Z_STRVAL_P(argv[5]),
                                    &attrib);
 
        RETURN_TRUE;
@@ -2671,14 +2671,14 @@ PHP_FUNCTION(cpdf_add_outline)
        convert_to_long(argv[3]);
        convert_to_long(argv[4]);
        convert_to_string(argv[5]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        pdf = zend_list_find(id, &type);
        if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
                php_error(E_WARNING, "Unable to find identifier %d", id);
                RETURN_FALSE;
        }
 
-       oid=argv[1]->value.lval;
+       oid=Z_LVAL_P(argv[1]);
        lastoutline = zend_list_find(oid, &type);
        if(!lastoutline || type!=CPDF_GLOBAL(le_outline)) {
                lastoutline = NULL;
@@ -2687,10 +2687,10 @@ PHP_FUNCTION(cpdf_add_outline)
        }
 
        lastoutline = cpdf_addOutlineEntry(pdf, lastoutline,
-                            argv[2]->value.lval,
-                            argv[3]->value.lval,
-                            argv[4]->value.lval,
-                            argv[5]->value.str.val,
+                            Z_LVAL_P(argv[2]),
+                            Z_LVAL_P(argv[3]),
+                            Z_LVAL_P(argv[4]),
+                            Z_STRVAL_P(argv[5]),
                             1, 0.0, 0.0, 0.0, 0.0);
 
        id = zend_list_insert(lastoutline, CPDF_GLOBAL(le_outline));
index 55f38023c9158e6b555685d4fe0028aefb42dbbc..5173087c46228ca9f64f4961f4183169ed0dbed2 100644 (file)
@@ -310,15 +310,15 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
        }
        
        for(hptr = handler; hptr->name &&
-                       strcasecmp(hptr->name, (*args[2])->value.str.val); hptr++);
+                       strcasecmp(hptr->name, Z_STRVAL_PP(args[2])); hptr++);
 
        if(!hptr->name) {
-               php_error(E_WARNING, "no such handler: %s", (*args[2])->value.str.val);
+               php_error(E_WARNING, "no such handler: %s", Z_STRVAL_PP(args[2]));
                FREENOW;
                RETURN_FALSE;
        }
 
-       switch((*args[1])->value.str.val[0]) {
+       switch(Z_STRVAL_PP(args[1])[0]) {
                case 'c': 
                        modenr = DBA_CREAT; 
                        break;
@@ -332,14 +332,14 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                        modenr = DBA_TRUNC;
                        break;
                default:
-                       php_error(E_WARNING, "illegal DBA mode: %s", (*args[1])->value.str.val);
+                       php_error(E_WARNING, "illegal DBA mode: %s", Z_STRVAL_PP(args[1]));
                        FREENOW;
                        RETURN_FALSE;
        }
                        
        info = malloc(sizeof(*info));
        memset(info, 0, sizeof(info));
-       info->path = strdup((*args[0])->value.str.val);
+       info->path = strdup(Z_STRVAL_PP(args[0]));
        info->mode = modenr;
        info->argc = ac - 3;
        info->argv = args + 3;
index 16076f7ebfaa43a8aa65c56525c1e085502ee795..2b4f7464a0c677eb08884f9e867f710a797e7f99 100644 (file)
@@ -62,7 +62,7 @@ DBA_OPEN_FUNC(db2)
 
        if(info->argc > 0) {
                convert_to_long_ex(info->argv[0]);
-               filemode = (*info->argv[0])->value.lval;
+               filemode = Z_LVAL_PP(info->argv[0]);
        }
 
        if(!db_open(info->path, type, gmode, filemode, NULL, NULL, &dbp)) {
index 861fbe9fb67fdb9c0cc62526e3c8b8379a006c5c..0df8dc930c2c2ff9c7859c540a05bfffd8552082 100644 (file)
@@ -64,7 +64,7 @@ DBA_OPEN_FUNC(db3)
 
        if (info->argc > 0) {
                convert_to_long_ex(info->argv[0]);
-               filemode = (*info->argv[0])->value.lval;
+               filemode = Z_LVAL_PP(info->argv[0]);
        }
 
        if (db_create(&dbp, NULL, 0) == 0 &&
index f8d1a9673579bccb0628eb1a46bb310beed23e93..20be3a63ab5d7e33ffd0336834d4b9c4b37cb360 100644 (file)
@@ -52,7 +52,7 @@ DBA_OPEN_FUNC(dbm)
 
        if(info->argc > 0) {
                convert_to_long_ex(info->argv[0]);
-               filemode = (*info->argv[0])->value.lval;
+               filemode = Z_LVAL_PP(info->argv[0]);
        }
        
        if(info->mode == DBA_TRUNC) {
index df6c34280db94029eb9fd6c23f641901203dc495..181be0566b719e9571b0bdd6151b44b6e694ca0c 100644 (file)
@@ -49,7 +49,7 @@ DBA_OPEN_FUNC(gdbm)
 
        if(info->argc > 0) {
                convert_to_long_ex(info->argv[0]);
-               filemode = (*info->argv[0])->value.lval;
+               filemode = Z_LVAL_PP(info->argv[0]);
        }
 
        dbf = gdbm_open(info->path, 0, gmode, filemode, NULL);
index a6117805c6e1a8d2bea48ac201d493f8627d453d..529fe1f5dd6f86e501d6393e4762faa240ff73a9 100644 (file)
@@ -56,7 +56,7 @@ DBA_OPEN_FUNC(ndbm)
 
        if(info->argc > 0) {
                convert_to_long_ex(info->argv[0]);
-               filemode = (*info->argv[0])->value.lval;
+               filemode = Z_LVAL_PP(info->argv[0]);
        }
 
        dbf = dbm_open(info->path, gmode, filemode);
index 862e4aea0f3bd52ad0cb9c94583021cafe5f9d7e..91ebdd6c5f2dd5cfbf6cc8d01d205e6cc342cf5a 100644 (file)
@@ -237,24 +237,24 @@ ZEND_FUNCTION(dbx_connect)
        }
        if (ZEND_NUM_ARGS()==number_of_arguments+1) {
                convert_to_long_ex(arguments[5]);
-               if ((*arguments[5])->value.lval!=0) persistent=1;
+               if (Z_LVAL_PP(arguments[5])!=0) persistent=1;
        }
 
-       if ((*arguments[0])->type == IS_LONG) {
-               if (!module_identifier_exists((*arguments[0])->value.lval)) {
-                       zend_error(E_WARNING, "dbx: module '%ld' not loaded or not supported.\n", (*arguments[0])->value.lval);
+       if (Z_TYPE_PP(arguments[0]) == IS_LONG) {
+               if (!module_identifier_exists(Z_LVAL_PP(arguments[0]))) {
+                       zend_error(E_WARNING, "dbx: module '%ld' not loaded or not supported.\n", Z_LVAL_PP(arguments[0]));
                        return;
                }
-               module_identifier = (*arguments[0])->value.lval;
+               module_identifier = Z_LVAL_PP(arguments[0]);
        } else {
                convert_to_string_ex(arguments[0]);
-               if (!module_exists((*arguments[0])->value.str.val)) {
-                       zend_error(E_WARNING, "dbx: module '%s' not loaded.\n", (*arguments[0])->value.str.val);
+               if (!module_exists(Z_STRVAL_PP(arguments[0]))) {
+                       zend_error(E_WARNING, "dbx: module '%s' not loaded.\n", Z_STRVAL_PP(arguments[0]));
                        return;
                }
-               module_identifier=get_module_identifier((*arguments[0])->value.str.val);
+               module_identifier=get_module_identifier(Z_STRVAL_PP(arguments[0]));
                if (!module_identifier) {
-                       zend_error(E_WARNING, "dbx: unsupported module '%s'.\n", (*arguments[0])->value.str.val);
+                       zend_error(E_WARNING, "dbx: unsupported module '%s'.\n", Z_STRVAL_PP(arguments[0]));
                        return;
                }
        }
@@ -268,7 +268,7 @@ ZEND_FUNCTION(dbx_connect)
        convert_to_string_ex(arguments[3]);
        convert_to_string_ex(arguments[4]);
        MAKE_STD_ZVAL(db_name); 
-       ZVAL_STRING(db_name, (*arguments[2])->value.str.val, 1);
+       ZVAL_STRING(db_name, Z_STRVAL_PP(arguments[2]), 1);
        if (persistent) {
                result = switch_dbx_pconnect(&rv_dbx_handle, arguments[1], arguments[2], arguments[3], arguments[4], INTERNAL_FUNCTION_PARAM_PASSTHRU, &dbx_module);
        } else {
@@ -367,7 +367,7 @@ ZEND_FUNCTION(dbx_query)
        /* parameter overrides */
        if (ZEND_NUM_ARGS()>2) {
                convert_to_long_ex(arguments[2]);
-               info_flags = (*arguments[2])->value.lval;
+               info_flags = Z_LVAL_PP(arguments[2]);
                /* fieldnames are needed for association! */
                if (info_flags & DBX_RESULT_ASSOC) {
                        info_flags |= DBX_RESULT_INFO;
@@ -554,8 +554,8 @@ ZEND_FUNCTION(dbx_compare)
                WRONG_PARAM_COUNT;
        }
 
-       if ((*arguments[0])->type != IS_ARRAY
-       || (*arguments[1])->type != IS_ARRAY) {
+       if (Z_TYPE_PP(arguments[0]) != IS_ARRAY
+       || Z_TYPE_PP(arguments[1]) != IS_ARRAY) {
                zend_error(E_WARNING, "Wrong argument type for compare");
                RETURN_LONG(0);
        }
@@ -565,27 +565,27 @@ ZEND_FUNCTION(dbx_compare)
        if (number_of_arguments>3) {
                convert_to_long_ex(arguments[3]); /* comparison type and direction*/
                /* direction */
-               if ((*arguments[3])->value.lval & DBX_CMP_DESC) {
+               if (Z_LVAL_PP(arguments[3]) & DBX_CMP_DESC) {
                        comparison_direction=DBX_CMP_DESC;
                }
-               if ((*arguments[3])->value.lval & DBX_CMP_ASC) {
+               if (Z_LVAL_PP(arguments[3]) & DBX_CMP_ASC) {
                        comparison_direction=DBX_CMP_ASC;
                }
                /* type */
-               if ((*arguments[3])->value.lval & DBX_CMP_NUMBER) {
+               if (Z_LVAL_PP(arguments[3]) & DBX_CMP_NUMBER) {
                        comparison_type=DBX_CMP_NUMBER;
                }
-               if ((*arguments[3])->value.lval & DBX_CMP_TEXT) {
+               if (Z_LVAL_PP(arguments[3]) & DBX_CMP_TEXT) {
                        comparison_type=DBX_CMP_TEXT;
                }
-               if ((*arguments[3])->value.lval & DBX_CMP_NATIVE) {
+               if (Z_LVAL_PP(arguments[3]) & DBX_CMP_NATIVE) {
                        comparison_type=DBX_CMP_NATIVE;
                }
        }
 
-       if (zend_hash_find((*arguments[0])->value.ht, (*arguments[2])->value.str.val, (*arguments[2])->value.str.len+1, (void **) &zv_a)==FAILURE
-       || zend_hash_find((*arguments[1])->value.ht, (*arguments[2])->value.str.val, (*arguments[2])->value.str.len+1, (void **) &zv_b)==FAILURE)  {
-               zend_error(E_WARNING, "Field '%s' not available in result-object", (*arguments[2])->value.str.val);
+       if (zend_hash_find(Z_ARRVAL_PP(arguments[0]), Z_STRVAL_PP(arguments[2]), Z_STRLEN_PP(arguments[2])+1, (void **) &zv_a)==FAILURE
+       || zend_hash_find(Z_ARRVAL_PP(arguments[1]), Z_STRVAL_PP(arguments[2]), Z_STRLEN_PP(arguments[2])+1, (void **) &zv_b)==FAILURE)  {
+               zend_error(E_WARNING, "Field '%s' not available in result-object", Z_STRVAL_PP(arguments[2]));
                RETURN_LONG(0);
        }
 
@@ -639,8 +639,8 @@ ZEND_FUNCTION(dbx_sort)
                WRONG_PARAM_COUNT;
        }
 
-       if ((*arguments[0])->type != IS_OBJECT
-       || (*arguments[1])->type != IS_STRING) {
+       if (Z_TYPE_PP(arguments[0]) != IS_OBJECT
+       || Z_TYPE_PP(arguments[1]) != IS_STRING) {
                zend_error(E_WARNING, "Wrong argument type for sort");
                RETURN_LONG(0);
        }
index 9578bead12a0a6df462afdcb0697900945f7fb64..0cfa24c3174596b7705582c5e28b24390d2051fa 100644 (file)
@@ -463,17 +463,17 @@ static void php_fbsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistant)
        if (argc >= 1)
        {
                convert_to_string_ex(argv[0]);
-               hostName = (*argv[0])->value.str.val;
+               hostName = Z_STRVAL_PP(argv[0]);
        }
        if (argc >= 2)
        {
                convert_to_string_ex(argv[1]);
-               userName =  (*argv[1])->value.str.val;
+               userName =  Z_STRVAL_PP(argv[1]);
        }   
        if (argc == 3)
        {
                convert_to_string_ex(argv[2]);
-               userPassword =  (*argv[2])->value.str.val;
+               userPassword =  Z_STRVAL_PP(argv[2]);
        }
 
        if (hostName     == NULL) hostName     = FB_SQL_G(hostName);
@@ -1896,7 +1896,7 @@ PHP_FUNCTION(fbsql_warnings)
        if (argc >= 1)
        {
                convert_to_long_ex(argv[0]);
-               FB_SQL_G(generateWarnings) = (*argv[0])->value.lval != 0;
+               FB_SQL_G(generateWarnings) = Z_LVAL_PP(argv[0]) != 0;
        }
        RETURN_BOOL(FB_SQL_G(generateWarnings));
 }
index bf9245c1be6f7f5ca4ad9ca713a4e21c2b576eba..c40b30db141afdff6156eec35c033c68a6b48f49 100644 (file)
@@ -2124,12 +2124,12 @@ static void php_imagepolygon(INTERNAL_FUNCTION_PARAMETERS, int filled)
        npoints = Z_LVAL_PP(NPOINTS);
        col = Z_LVAL_PP(COL);
 
-       if ((*POINTS)->type != IS_ARRAY) {
+       if (Z_TYPE_PP(POINTS) != IS_ARRAY) {
                php_error(E_WARNING, "2nd argument to imagepolygon not an array");
                RETURN_FALSE;
        }
 
-       nelem = zend_hash_num_elements((*POINTS)->value.ht);
+       nelem = zend_hash_num_elements(Z_ARRVAL_PP(POINTS));
        if (nelem < 6) {
                php_error(E_WARNING, "you must have at least 3 points in your array");
                RETURN_FALSE;
@@ -2143,12 +2143,12 @@ static void php_imagepolygon(INTERNAL_FUNCTION_PARAMETERS, int filled)
        points = (gdPointPtr) emalloc(npoints * sizeof(gdPoint));
 
        for (i = 0; i < npoints; i++) {
-               if (zend_hash_index_find((*POINTS)->value.ht, (i * 2), (void **) &var) == SUCCESS) {
+               if (zend_hash_index_find(Z_ARRVAL_PP(POINTS), (i * 2), (void **) &var) == SUCCESS) {
                        SEPARATE_ZVAL((var));
                        convert_to_long(*var);
                        points[i].x = Z_LVAL_PP(var);
                }
-               if (zend_hash_index_find((*POINTS)->value.ht, (i * 2) + 1, (void **) &var) == SUCCESS) {
+               if (zend_hash_index_find(Z_ARRVAL_PP(POINTS), (i * 2) + 1, (void **) &var) == SUCCESS) {
                        SEPARATE_ZVAL(var);
                        convert_to_long(*var);
                        points[i].y = Z_LVAL_PP(var);
index ed1ebd110337ca20495b74c54555de3d2f85913c..f9a3e94de5ad1ae498d2e7c5fa378a4e1a297790 100644 (file)
@@ -725,20 +725,20 @@ static void php_hw_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
 
        /* Host: */
        convert_to_string_ex(argv[0]);
-       host = (char *) estrndup((*argv[0])->value.str.val, (*argv[0])->value.str.len);
+       host = (char *) estrndup(Z_STRVAL_PP(argv[0]), Z_STRLEN_PP(argv[0]));
 
        /* Port: */
        convert_to_long_ex(argv[1]);
-       port = (*argv[1])->value.lval;
+       port = Z_LVAL_PP(argv[1]);
 
        /* Username and Password */
        if(argc > 2) {
                /* Username */
                convert_to_string_ex(argv[2]);
-               username = (char *) estrndup((*argv[2])->value.str.val, (*argv[2])->value.str.len);
+               username = (char *) estrndup(Z_STRVAL_PP(argv[2]), Z_STRLEN_PP(argv[2]));
                /* Password */
                convert_to_string_ex(argv[3]);
-               password = (char *) estrndup((*argv[3])->value.str.val, (*argv[3])->value.str.len);
+               password = (char *) estrndup(Z_STRVAL_PP(argv[3]), Z_STRLEN_PP(argv[3]));
        }
 
        /* Create identifier string for connection */
@@ -981,7 +981,7 @@ PHP_FUNCTION(hw_close)
                WRONG_PARAM_COUNT;
        }
        convert_to_long_ex(arg1);
-       id=(*arg1)->value.lval;
+       id=Z_LVAL_PP(arg1);
        ptr = zend_list_find(id, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -1005,7 +1005,7 @@ PHP_FUNCTION(hw_info)
                WRONG_PARAM_COUNT;
        }
        convert_to_long_ex(arg1);
-       id=(*arg1)->value.lval;
+       id=Z_LVAL_PP(arg1);
        ptr = zend_list_find(id, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -1037,7 +1037,7 @@ PHP_FUNCTION(hw_error)
                WRONG_PARAM_COUNT;
        }
        convert_to_long_ex(arg1);
-       id=(*arg1)->value.lval;
+       id=Z_LVAL_PP(arg1);
        ptr = zend_list_find(id, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -1060,7 +1060,7 @@ PHP_FUNCTION(hw_errormsg)
                WRONG_PARAM_COUNT;
        }
        convert_to_long_ex(arg1);
-       id=(*arg1)->value.lval;
+       id=Z_LVAL_PP(arg1);
        ptr = zend_list_find(id, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -1351,7 +1351,7 @@ char *php_hw_command(INTERNAL_FUNCTION_PARAMETERS, int comm) {
                return NULL;
        }
        convert_to_long_ex(arg1);
-       link=(*arg1)->value.lval;
+       link=Z_LVAL_PP(arg1);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", link);
@@ -1516,9 +1516,9 @@ PHP_FUNCTION(hw_dummy)
        convert_to_long_ex(arg1);
        convert_to_long_ex(arg2);
        convert_to_long_ex(arg3);
-       link=(*arg1)->value.lval;
-       id=(*arg2)->value.lval;
-       msgid=(*arg3)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       id=Z_LVAL_PP(arg2);
+       msgid=Z_LVAL_PP(arg3);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -1555,7 +1555,7 @@ PHP_FUNCTION(hw_getobject)
                WRONG_PARAM_COUNT;
 
        convert_to_long_ex(argv[0]);
-       if((*argv[1])->type == IS_ARRAY) {
+       if(Z_TYPE_PP(argv[1]) == IS_ARRAY) {
                multi = 1;
                convert_to_array_ex(argv[1]);
        } else {
@@ -1565,11 +1565,11 @@ PHP_FUNCTION(hw_getobject)
 
        if(argc == 3) {
                convert_to_string_ex(argv[2]);
-               query = (*argv[2])->value.str.val;
+               query = Z_STRVAL_PP(argv[2]);
        } else
                query = NULL;
 
-       link=(*argv[0])->value.lval;
+       link=Z_LVAL_PP(argv[0]);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", link);
@@ -1583,7 +1583,7 @@ PHP_FUNCTION(hw_getobject)
                HashTable *lht;
                zval **keydata;
 
-               lht = (*argv[1])->value.ht;
+               lht = Z_ARRVAL_PP(argv[1]);
                if(0 == (count = zend_hash_num_elements(lht))) {
                        RETURN_FALSE;
                }
@@ -1619,7 +1619,7 @@ PHP_FUNCTION(hw_getobject)
                
        } else {
                char *object = NULL;
-               id=(*argv[1])->value.lval;
+               id=Z_LVAL_PP(argv[1]);
                if (0 != (ptr->lasterror = send_getobject(ptr->socket, id, &object)))
                        RETURN_FALSE;
 
@@ -1643,9 +1643,9 @@ PHP_FUNCTION(hw_insertobject)
        convert_to_long(arg1);
        convert_to_string(arg2);
        convert_to_string(arg3);
-       link=arg1->value.lval;
-       objrec=arg2->value.str.val;
-       parms=arg3->value.str.val;
+       link=Z_LVAL_P(arg1);
+       objrec=Z_STRVAL_P(arg2);
+       parms=Z_STRVAL_P(arg3);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", link);
@@ -1676,8 +1676,8 @@ PHP_FUNCTION(hw_getandlock)
        }
        convert_to_long(arg1);
        convert_to_long(arg2);
-       link=arg1->value.lval;
-       id=arg2->value.lval;
+       link=Z_LVAL_P(arg1);
+       id=Z_LVAL_P(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -1708,8 +1708,8 @@ PHP_FUNCTION(hw_unlock)
        }
        convert_to_long(arg1);
        convert_to_long(arg2);
-       link=arg1->value.lval;
-       id=arg2->value.lval;
+       link=Z_LVAL_P(arg1);
+       id=Z_LVAL_P(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -1737,8 +1737,8 @@ PHP_FUNCTION(hw_deleteobject)
        }
        convert_to_long(arg1);
        convert_to_long(arg2);
-       link=arg1->value.lval;
-       id=arg2->value.lval;
+       link=Z_LVAL_P(arg1);
+       id=Z_LVAL_P(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -1769,9 +1769,9 @@ PHP_FUNCTION(hw_changeobject)
        convert_to_long(arg1); /* Connection */
        convert_to_long(arg2); /* object ID */
        convert_to_array(arg3); /* Array with new attributes */
-       link=arg1->value.lval;
-       id=arg2->value.lval;
-       newobjarr=arg3->value.ht;
+       link=Z_LVAL_P(arg1);
+       id=Z_LVAL_P(arg2);
+       newobjarr=Z_ARRVAL_P(arg3);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -1868,13 +1868,13 @@ PHP_FUNCTION(hw_modifyobject)
        convert_to_array_ex(argv[3]); /* Array with attributes to add */
        if(argc == 5) {
                convert_to_long_ex(argv[4]);
-               mode = (*argv[4])->value.lval;
+               mode = Z_LVAL_PP(argv[4]);
        } else
                mode = 0;
-       link=(*argv[0])->value.lval;
-       id=(*argv[1])->value.lval;
-       remobjarr=(*argv[2])->value.ht;
-       addobjarr=(*argv[3])->value.ht;
+       link=Z_LVAL_PP(argv[0]);
+       id=Z_LVAL_PP(argv[1]);
+       remobjarr=Z_ARRVAL_PP(argv[2]);
+       addobjarr=Z_ARRVAL_PP(argv[3]);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -2093,16 +2093,16 @@ void php_hw_mvcp(INTERNAL_FUNCTION_PARAMETERS, int mvcp) {
        convert_to_long(arg1);
        convert_to_array(arg2);
        convert_to_long(arg3);
-       link=arg1->value.lval;
-       src_arr=arg2->value.ht;
+       link=Z_LVAL_P(arg1);
+       src_arr=Z_ARRVAL_P(arg2);
        switch(mvcp) {
                case MOVE: /* Move also has fromID, which is arg3 --> arg4 becomes destID */
                        convert_to_long(arg4);
-                       from=arg3->value.lval;
-                       dest=arg4->value.lval;
+                       from=Z_LVAL_P(arg3);
+                       dest=Z_LVAL_P(arg4);
                        break;
                case COPY: /* No fromID for Copy needed --> arg3 is destID */
-                       dest=arg3->value.lval;
+                       dest=Z_LVAL_P(arg3);
                        from = 0;
                        break;
        }
@@ -2204,20 +2204,20 @@ PHP_FUNCTION(hw_gettext)
        mode = 0;
        urlprefix = NULL;
        if(argc == 3) {
-               switch(argv[2]->type) {
+               switch(Z_TYPE_P(argv[2])) {
                        case IS_LONG:
                                convert_to_long(argv[2]);
-                               rootid = argv[2]->value.lval;
+                               rootid = Z_LVAL_P(argv[2]);
                                mode = 1;
                                break;
                        case IS_STRING: 
                                convert_to_string(argv[2]);
-                               urlprefix = argv[2]->value.str.val;
+                               urlprefix = Z_STRVAL_P(argv[2]);
                                break;
                }
        }
-       link=argv[0]->value.lval;
-       id=argv[1]->value.lval;
+       link=Z_LVAL_P(argv[0]);
+       id=Z_LVAL_P(argv[1]);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -2258,7 +2258,7 @@ PHP_FUNCTION(hw_edittext)
        }
        convert_to_long(arg1);
        convert_to_long(arg2);
-       link=arg1->value.lval;
+       link=Z_LVAL_P(arg1);
        ptr = zend_list_find(link, &type);
 
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
@@ -2266,7 +2266,7 @@ PHP_FUNCTION(hw_edittext)
                RETURN_FALSE;
        }
 
-       doc=arg2->value.lval;
+       doc=Z_LVAL_P(arg2);
        docptr = zend_list_find(doc, &type);
 
        if(!docptr || (type!=le_document)) {
@@ -2301,8 +2301,8 @@ PHP_FUNCTION(hw_getcgi)
        }
        convert_to_long(arg1);
        convert_to_long(arg2);
-       link=arg1->value.lval;
-       id=arg2->value.lval;
+       link=Z_LVAL_P(arg1);
+       id=Z_LVAL_P(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -2363,8 +2363,8 @@ PHP_FUNCTION(hw_getremote)
        }
        convert_to_long(arg1);
        convert_to_long(arg2);
-       link=arg1->value.lval;
-       id=arg2->value.lval;
+       link=Z_LVAL_P(arg1);
+       id=Z_LVAL_P(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -2404,8 +2404,8 @@ PHP_FUNCTION(hw_getremotechildren)
        }
        convert_to_long(arg1);
        convert_to_string(arg2);
-       link=arg1->value.lval;
-       objrec=arg2->value.str.val;
+       link=Z_LVAL_P(arg1);
+       objrec=Z_STRVAL_P(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", link);
@@ -2508,8 +2508,8 @@ PHP_FUNCTION(hw_setlinkroot)
        }
        convert_to_long(arg1);
        convert_to_long(arg2);
-       link = arg1->value.lval;
-       rootid = arg2->value.lval;
+       link = Z_LVAL_P(arg1);
+       rootid = Z_LVAL_P(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", link);
@@ -2554,8 +2554,8 @@ PHP_FUNCTION(hw_pipedocument)
        convert_to_long(arg1);
        convert_to_long(arg2);
        
-       link=arg1->value.lval;
-       id=arg2->value.lval;
+       link=Z_LVAL_P(arg1);
+       id=Z_LVAL_P(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", link);
@@ -2565,7 +2565,7 @@ PHP_FUNCTION(hw_pipedocument)
        /* check for the array with urlprefixes */
        if(argc == 3) {
                convert_to_array(arg3);
-               prefixarray =arg3->value.ht;
+               prefixarray =Z_ARRVAL_P(arg3);
                if((prefixarray == NULL) || (zend_hash_num_elements(prefixarray) != 5)) {
                        php_error(E_WARNING, "You must provide 5 urlprefixes (you have provided %d)", zend_hash_num_elements(prefixarray));
                        RETURN_FALSE;
@@ -2663,12 +2663,12 @@ PHP_FUNCTION(hw_oldpipedocument)
        convert_to_long(argv[1]);
 /*     if(argc == 3) {
                convert_to_long(argv[2]);
-               rootid = argv[2]->value.lval;
+               rootid = Z_LVAL_P(argv[2]);
                if(rootid != 0)
                        mode = 1;
        }
-*/     link=argv[0]->value.lval;
-       id=argv[1]->value.lval;
+*/     link=Z_LVAL_P(argv[0]);
+       id=Z_LVAL_P(argv[1]);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", link);
@@ -2728,8 +2728,8 @@ PHP_FUNCTION(hw_pipecgi)
        }
        convert_to_long(arg1);
        convert_to_long(arg2);
-       link=arg1->value.lval;
-       id=arg2->value.lval;
+       link=Z_LVAL_P(arg1);
+       id=Z_LVAL_P(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -2794,15 +2794,15 @@ PHP_FUNCTION(hw_insertdocument)
        convert_to_long(arg1);
        convert_to_long(arg2);
        convert_to_long(arg3);
-       link=arg1->value.lval;
-       id=arg2->value.lval;
+       link=Z_LVAL_P(arg1);
+       id=Z_LVAL_P(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find connection identifier %d", link);
                RETURN_FALSE;
        }
 
-       doc=arg3->value.lval;
+       doc=Z_LVAL_P(arg3);
        docptr = zend_list_find(doc, &type);
        if(!docptr || (type!=le_document)) {
                php_error(E_WARNING, "Unable to find document identifier %d", doc);
@@ -2844,17 +2844,17 @@ PHP_FUNCTION(hw_new_document)
        doc = malloc(sizeof(hw_document));
        if(NULL == doc)
                RETURN_FALSE;
-       doc->data = malloc(arg3->value.lval+1);
+       doc->data = malloc(Z_LVAL_P(arg3)+1);
        if(NULL == doc->data) {
                free(doc);
                RETURN_FALSE;
        }
-       memcpy(doc->data, arg2->value.str.val, arg3->value.lval);
+       memcpy(doc->data, Z_STRVAL_P(arg2), Z_LVAL_P(arg3));
        ptr = doc->data;
-       ptr[arg3->value.lval] = '\0';
-       doc->attributes = strdup(arg1->value.str.val);
+       Z_LVAL_P(ptr[arg3)] = '\0';
+       doc->attributes = strdup(Z_STRVAL_P(arg1));
        doc->bodytag = NULL;
-       doc->size = arg3->value.lval;
+       doc->size = Z_LVAL_P(arg3);
        Z_LVAL_P(return_value) = zend_list_insert(doc, le_document);
        Z_TYPE_P(return_value) = IS_LONG;
 }
@@ -2883,7 +2883,7 @@ PHP_FUNCTION(hw_new_document_from_file)
        convert_to_string_ex(arg1);
        convert_to_string_ex(arg2);
 
-       fp = php_fopen_wrapper((*arg2)->value.str.val, "r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL TSRMLS_CC);
+       fp = php_fopen_wrapper(Z_STRVAL_PP(arg2), "r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL TSRMLS_CC);
        if (!fp && !socketd){
                if (issock != BAD_URL) {
                        char *tmp = estrndup(Z_STRVAL_PP(arg2), Z_STRLEN_PP(arg2));
@@ -2955,7 +2955,7 @@ PHP_FUNCTION(hw_new_document_from_file)
        doc->data = realloc(doc->data, bcount+1);
        ptr = doc->data;
        ptr[bcount] = '\0';
-       doc->attributes = strdup((*arg1)->value.str.val);
+       doc->attributes = strdup(Z_STRVAL_PP(arg1));
        doc->bodytag = NULL;
        doc->size = bcount;
        Z_LVAL_P(return_value) = zend_list_insert(doc, le_document);
@@ -2976,7 +2976,7 @@ PHP_FUNCTION(hw_free_document)
                WRONG_PARAM_COUNT;
        }
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        ptr = zend_list_find(id, &type);
        if(!ptr || (type!=le_document)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -3003,7 +3003,7 @@ PHP_FUNCTION(hw_output_document)
                WRONG_PARAM_COUNT;
        }
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        ptr = zend_list_find(id, &type);
        if(!ptr || (type!=le_document)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -3037,7 +3037,7 @@ PHP_FUNCTION(hw_document_bodytag)
                RETURN_FALSE;
        
        convert_to_long(argv[0]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        ptr = zend_list_find(id, &type);
        if(!ptr || (type!=le_document)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -3046,14 +3046,14 @@ PHP_FUNCTION(hw_document_bodytag)
 
        if(argc == 2) {
                convert_to_string(argv[1]);
-               str=argv[1]->value.str.val;
+               str=Z_STRVAL_P(argv[1]);
        }
 
        if(str != NULL) {
-               temp = emalloc(argv[1]->value.str.len + strlen(ptr->bodytag) + 2);
+               temp = emalloc(Z_STRLEN_P(argv[1]) + strlen(ptr->bodytag) + 2);
                strcpy(temp, ptr->bodytag);
                strcpy(temp+strlen(ptr->bodytag)-1, str);
-               strcpy(temp+strlen(ptr->bodytag)-1+argv[1]->value.str.len, ">\n");
+               strcpy(temp+strlen(ptr->bodytag)-1+Z_STRLEN_P(argv[1]), ">\n");
                RETURN_STRING(temp, 0);
        } else {
 //fprintf(stderr, "hw_document_bodytag: %s (%s)\n", ptr->bodytag, ptr->attributes);
@@ -3082,7 +3082,7 @@ PHP_FUNCTION(hw_document_content)
                RETURN_FALSE;
        
        convert_to_long(argv[0]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        ptr = zend_list_find(id, &type);
        if(!ptr || (type!=le_document)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -3111,7 +3111,7 @@ PHP_FUNCTION(hw_document_setcontent)
        
        convert_to_long(argv[0]);
        convert_to_string(argv[1]);
-       id=argv[0]->value.lval;
+       id=Z_LVAL_P(argv[0]);
        ptr = zend_list_find(id, &type);
        if(!ptr || (type!=le_document)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -3119,7 +3119,7 @@ PHP_FUNCTION(hw_document_setcontent)
        }
 
        str = ptr->data;
-       if(NULL != (ptr->data = strdup(argv[1]->value.str.val))) {
+       if(NULL != (ptr->data = strdup(Z_STRVAL_P(argv[1])))) {
                ptr->size = strlen(ptr->data);
                free(str);
                RETURN_TRUE;
@@ -3146,7 +3146,7 @@ PHP_FUNCTION(hw_document_size)
                WRONG_PARAM_COUNT;
        }
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        ptr = zend_list_find(id, &type);
        if(!ptr || (type!=le_document)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -3173,7 +3173,7 @@ PHP_FUNCTION(hw_document_attributes)
                WRONG_PARAM_COUNT;
        }
        convert_to_long(arg1);
-       id=arg1->value.lval;
+       id=Z_LVAL_P(arg1);
        ptr = zend_list_find(id, &type);
        if(!ptr || (type!=le_document)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -3200,8 +3200,8 @@ PHP_FUNCTION(hw_getparentsobj)
        }
        convert_to_long(arg1);
        convert_to_long(arg2);
-       link=arg1->value.lval;
-       id=arg2->value.lval;
+       link=Z_LVAL_P(arg1);
+       id=Z_LVAL_P(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -3235,8 +3235,8 @@ PHP_FUNCTION(hw_getparents)
        }
        convert_to_long(arg1);
        convert_to_long(arg2);
-       link=arg1->value.lval;
-       id=arg2->value.lval;
+       link=Z_LVAL_P(arg1);
+       id=Z_LVAL_P(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -3281,8 +3281,8 @@ PHP_FUNCTION(hw_children)
        }
        convert_to_long_ex(arg1);
        convert_to_long_ex(arg2);
-       link=(*arg1)->value.lval;
-       id=(*arg2)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       id=Z_LVAL_PP(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -3328,8 +3328,8 @@ PHP_FUNCTION(hw_childrenobj)
        }
        convert_to_long_ex(arg1);
        convert_to_long_ex(arg2);
-       link=(*arg1)->value.lval;
-       id=(*arg2)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       id=Z_LVAL_PP(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -3363,8 +3363,8 @@ PHP_FUNCTION(hw_getchildcoll)
        }
        convert_to_long_ex(arg1);
        convert_to_long_ex(arg2);
-       link=(*arg1)->value.lval;
-       id=(*arg2)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       id=Z_LVAL_PP(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -3410,8 +3410,8 @@ PHP_FUNCTION(hw_getchildcollobj)
        }
        convert_to_long_ex(arg1);
        convert_to_long_ex(arg2);
-       link=(*arg1)->value.lval;
-       id=(*arg2)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       id=Z_LVAL_PP(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -3444,8 +3444,8 @@ PHP_FUNCTION(hw_docbyanchor)
        }
        convert_to_long_ex(arg1);
        convert_to_long_ex(arg2);
-       link=(*arg1)->value.lval;
-       id=(*arg2)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       id=Z_LVAL_PP(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -3476,8 +3476,8 @@ PHP_FUNCTION(hw_docbyanchorobj)
        }
        convert_to_long_ex(arg1);
        convert_to_long_ex(arg2);
-       link=(*arg1)->value.lval;
-       id=(*arg2)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       id=Z_LVAL_PP(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -3516,9 +3516,9 @@ PHP_FUNCTION(hw_getobjectbyquery)
        convert_to_long_ex(arg1);
        convert_to_string_ex(arg2);
        convert_to_long_ex(arg3);
-       link=(*arg1)->value.lval;
-       query=(*arg2)->value.str.val;
-       maxhits=(*arg3)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       query=Z_STRVAL_PP(arg2);
+       maxhits=Z_LVAL_PP(arg3);
        if (maxhits < 0) maxhits=0x7FFFFFFF;
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
@@ -3560,9 +3560,9 @@ PHP_FUNCTION(hw_getobjectbyqueryobj)
        convert_to_long_ex(arg1);
        convert_to_string_ex(arg2);
        convert_to_long_ex(arg3);
-       link=(*arg1)->value.lval;
-       query=(*arg2)->value.str.val;
-       maxhits=(*arg3)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       query=Z_STRVAL_PP(arg2);
+       maxhits=Z_LVAL_PP(arg3);
        if (maxhits < 0) maxhits=0x7FFFFFFF;
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
@@ -3600,10 +3600,10 @@ PHP_FUNCTION(hw_getobjectbyquerycoll)
        convert_to_long_ex(arg2);
        convert_to_string_ex(arg3);
        convert_to_long_ex(arg4);
-       link=(*arg1)->value.lval;
-       id=(*arg2)->value.lval;
-       query=(*arg3)->value.str.val;
-       maxhits=(*arg4)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       id=Z_LVAL_PP(arg2);
+       query=Z_STRVAL_PP(arg3);
+       maxhits=Z_LVAL_PP(arg4);
        if (maxhits < 0) maxhits=0x7FFFFFFF;
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
@@ -3646,10 +3646,10 @@ PHP_FUNCTION(hw_getobjectbyquerycollobj)
        convert_to_long_ex(arg2);
        convert_to_string_ex(arg3);
        convert_to_long_ex(arg4);
-       link=(*arg1)->value.lval;
-       id=(*arg2)->value.lval;
-       query=(*arg3)->value.str.val;
-       maxhits=(*arg4)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       id=Z_LVAL_PP(arg2);
+       query=Z_STRVAL_PP(arg3);
+       maxhits=Z_LVAL_PP(arg4);
        if (maxhits < 0) maxhits=0x7FFFFFFF;
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
@@ -3687,9 +3687,9 @@ PHP_FUNCTION(hw_getobjectbyftquery)
        convert_to_long_ex(arg1);
        convert_to_string_ex(arg2);
        convert_to_long_ex(arg3);
-       link=(*arg1)->value.lval;
-       query=(*arg2)->value.str.val;
-       maxhits=(*arg3)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       query=Z_STRVAL_PP(arg2);
+       maxhits=Z_LVAL_PP(arg3);
        if (maxhits < 0) maxhits=0x7FFFFFFF;
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
@@ -3732,9 +3732,9 @@ PHP_FUNCTION(hw_getobjectbyftqueryobj)
        convert_to_long_ex(arg1);
        convert_to_string_ex(arg2);
        convert_to_long_ex(arg3);
-       link=(*arg1)->value.lval;
-       query=(*arg2)->value.str.val;
-       maxhits=(*arg3)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       query=Z_STRVAL_PP(arg2);
+       maxhits=Z_LVAL_PP(arg3);
        if (maxhits < 0) maxhits=0x7FFFFFFF;
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
@@ -3773,10 +3773,10 @@ PHP_FUNCTION(hw_getobjectbyftquerycoll)
        convert_to_long_ex(arg2);
        convert_to_string_ex(arg3);
        convert_to_long_ex(arg4);
-       link=(*arg1)->value.lval;
-       id=(*arg2)->value.lval;
-       query=(*arg3)->value.str.val;
-       maxhits=(*arg4)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       id=Z_LVAL_PP(arg2);
+       query=Z_STRVAL_PP(arg3);
+       maxhits=Z_LVAL_PP(arg4);
        if (maxhits < 0) maxhits=0x7FFFFFFF;
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
@@ -3820,10 +3820,10 @@ PHP_FUNCTION(hw_getobjectbyftquerycollobj)
        convert_to_long_ex(arg2);
        convert_to_string_ex(arg3);
        convert_to_long_ex(arg4);
-       link=(*arg1)->value.lval;
-       id=(*arg2)->value.lval;
-       query=(*arg3)->value.str.val;
-       maxhits=(*arg4)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       id=Z_LVAL_PP(arg2);
+       query=Z_STRVAL_PP(arg3);
+       maxhits=Z_LVAL_PP(arg4);
        if (maxhits < 0) maxhits=0x7FFFFFFF;
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
@@ -3858,8 +3858,8 @@ PHP_FUNCTION(hw_getchilddoccoll)
        }
        convert_to_long_ex(arg1);
        convert_to_long_ex(arg2);
-       link=(*arg1)->value.lval;
-       id=(*arg2)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       id=Z_LVAL_PP(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -3898,8 +3898,8 @@ PHP_FUNCTION(hw_getchilddoccollobj)
        }
        convert_to_long_ex(arg1);
        convert_to_long_ex(arg2);
-       link=(*arg1)->value.lval;
-       id=(*arg2)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       id=Z_LVAL_PP(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -3934,8 +3934,8 @@ PHP_FUNCTION(hw_getanchors)
        }
        convert_to_long_ex(arg1);
        convert_to_long_ex(arg2);
-       link=(*arg1)->value.lval;
-       id=(*arg2)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       id=Z_LVAL_PP(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -3974,8 +3974,8 @@ PHP_FUNCTION(hw_getanchorsobj)
        }
        convert_to_long_ex(arg1);
        convert_to_long_ex(arg2);
-       link=(*arg1)->value.lval;
-       id=(*arg2)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       id=Z_LVAL_PP(arg2);
        ptr = (hw_connection *) zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", id);
@@ -4006,7 +4006,7 @@ PHP_FUNCTION(hw_getusername)
                WRONG_PARAM_COUNT;
        }
        convert_to_long_ex(arg1);
-       link = (*arg1)->value.lval;
+       link = Z_LVAL_PP(arg1);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", link);
@@ -4034,9 +4034,9 @@ PHP_FUNCTION(hw_identify)
        convert_to_long_ex(arg1);
        convert_to_string_ex(arg2);
        convert_to_string_ex(arg3);
-       link = (*arg1)->value.lval;
-       name=(*arg2)->value.str.val;
-       passwd=(*arg3)->value.str.val;
+       link = Z_LVAL_PP(arg1);
+       name=Z_STRVAL_PP(arg2);
+       passwd=Z_STRVAL_PP(arg3);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", link);
@@ -4080,14 +4080,14 @@ PHP_FUNCTION(hw_objrec2array)
                        if(zend_get_parameters_ex(1, &arg1) == FAILURE)
                                WRONG_PARAM_COUNT;
                        convert_to_string_ex(arg1);
-                       make2_return_array_from_objrec(&return_value, (*arg1)->value.str.val, NULL);
+                       make2_return_array_from_objrec(&return_value, Z_STRVAL_PP(arg1), NULL);
                        break;
                case 2:
                        if(zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE)
                                WRONG_PARAM_COUNT;
                        convert_to_array_ex(arg2);
                        convert_to_string_ex(arg1);
-                       make2_return_array_from_objrec(&return_value, (*arg1)->value.str.val, *arg2);
+                       make2_return_array_from_objrec(&return_value, Z_STRVAL_PP(arg1), *arg2);
                        break;
                default:
                        WRONG_PARAM_COUNT;
@@ -4106,7 +4106,7 @@ PHP_FUNCTION(hw_array2objrec)
                WRONG_PARAM_COUNT;
        }
        convert_to_array_ex(arg1);
-       objrec = make_objrec_from_array((*arg1)->value.ht);
+       objrec = make_objrec_from_array(Z_ARRVAL_PP(arg1));
        if(objrec) {
                retobj = estrdup(objrec);
                free(objrec);
@@ -4132,22 +4132,22 @@ PHP_FUNCTION(hw_incollections)
        convert_to_array_ex(arg2);
        convert_to_array_ex(arg3);
        convert_to_long_ex(arg4);
-       link = (*arg1)->value.lval;
-       retcoll=(*arg4)->value.lval;
+       link = Z_LVAL_PP(arg1);
+       retcoll=Z_LVAL_PP(arg4);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", link);
                RETURN_FALSE;
        }
 
-       cobjids = zend_hash_num_elements((*arg2)->value.ht);
-       if(NULL == (objectIDs = make_ints_from_array((*arg2)->value.ht))) {
+       cobjids = zend_hash_num_elements(Z_ARRVAL_PP(arg2));
+       if(NULL == (objectIDs = make_ints_from_array(Z_ARRVAL_PP(arg2)))) {
                php_error(E_WARNING, "Could not create Int Array from Array\n");
                RETURN_FALSE;
        }
 
-       ccollids = zend_hash_num_elements((*arg3)->value.ht);
-       if(NULL == (collIDs = make_ints_from_array((*arg3)->value.ht))) {
+       ccollids = zend_hash_num_elements(Z_ARRVAL_PP(arg3));
+       if(NULL == (collIDs = make_ints_from_array(Z_ARRVAL_PP(arg3)))) {
                php_error(E_WARNING, "Could not create Int Array from Array\n");
                efree(objectIDs);
                RETURN_FALSE;
@@ -4193,15 +4193,15 @@ PHP_FUNCTION(hw_inscoll)
        convert_to_long_ex(arg1);
        convert_to_long_ex(arg2);
        convert_to_array_ex(arg3);
-       link = (*arg1)->value.lval;
-       id=(*arg2)->value.lval;
+       link = Z_LVAL_PP(arg1);
+       id=Z_LVAL_PP(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", link);
                RETURN_FALSE;
        }
 
-       if(NULL == (objrec = make_objrec_from_array((*arg3)->value.ht))) {
+       if(NULL == (objrec = make_objrec_from_array(Z_ARRVAL_PP(arg3)))) {
                php_error(E_WARNING, "Could not create Object Record from Array\n");
                RETURN_FALSE;
        }
@@ -4238,12 +4238,12 @@ PHP_FUNCTION(hw_insdoc)
        convert_to_string_ex(argv[2]);
        if(argc == 4) {
                convert_to_string_ex(argv[3]);
-               text = (*argv[3])->value.str.val;
+               text = Z_STRVAL_PP(argv[3]);
        } else {
                text = NULL;
        }
-       link = (*argv[0])->value.lval;
-       id = (*argv[1])->value.lval;
+       link = Z_LVAL_PP(argv[0]);
+       id = Z_LVAL_PP(argv[1]);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", link);
@@ -4251,7 +4251,7 @@ PHP_FUNCTION(hw_insdoc)
        }
 
        set_swap(ptr->swap_on);
-        objrec = (*argv[2])->value.str.val;
+        objrec = Z_STRVAL_PP(argv[2]);
        if (0 != (ptr->lasterror = send_insdoc(ptr->socket, id, objrec, text, &newid))) {
                RETURN_FALSE;
        }
@@ -4275,8 +4275,8 @@ PHP_FUNCTION(hw_getsrcbydestobj)
        }
        convert_to_long_ex(arg1);
        convert_to_long_ex(arg2);
-       link=(*arg1)->value.lval;
-       id=(*arg2)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       id=Z_LVAL_PP(arg2);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", link);
@@ -4309,9 +4309,9 @@ PHP_FUNCTION(hw_mapid)
        convert_to_long_ex(arg1);
        convert_to_long_ex(arg2);
        convert_to_long_ex(arg3);
-       link=(*arg1)->value.lval;
-       servid=(*arg2)->value.lval;
-       id=(*arg3)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       servid=Z_LVAL_PP(arg2);
+       id=Z_LVAL_PP(arg3);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", link);
@@ -4344,10 +4344,10 @@ PHP_FUNCTION(hw_getrellink)
        convert_to_long_ex(arg2);
        convert_to_long_ex(arg3);
        convert_to_long_ex(arg4);
-       link=(*arg1)->value.lval;
-       rootid=(*arg2)->value.lval;
-       sourceid=(*arg3)->value.lval;
-       destid=(*arg4)->value.lval;
+       link=Z_LVAL_PP(arg1);
+       rootid=Z_LVAL_PP(arg2);
+       sourceid=Z_LVAL_PP(arg3);
+       destid=Z_LVAL_PP(arg4);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", link);
@@ -4397,7 +4397,7 @@ PHP_FUNCTION(hw_insertanchors)
        convert_to_long_ex(arg1);
        convert_to_array_ex(arg2);
        convert_to_array_ex(arg3);
-       docid=(*arg1)->value.lval;
+       docid=Z_LVAL_PP(arg1);
        hwdoc = zend_list_find(docid, &type);
        if(!hwdoc || (type!=le_document)) {
                php_error(E_WARNING, "Unable to find file identifier %d", docid);
@@ -4408,7 +4408,7 @@ PHP_FUNCTION(hw_insertanchors)
        if(argc == 4) {
                int i;
                convert_to_array_ex(arg4);
-               prefixarray =(*arg4)->value.ht;
+               prefixarray =Z_ARRVAL_PP(arg4);
                if((prefixarray == NULL) || (zend_hash_num_elements(prefixarray) != 5)) {
                        php_error(E_WARNING, "You must provide 5 urlprefixes (you have provided %d)", zend_hash_num_elements(prefixarray));
                        RETURN_FALSE;
@@ -4447,15 +4447,15 @@ PHP_FUNCTION(hw_insertanchors)
                urlprefix = NULL;
        }
 
-       if(zend_hash_num_elements((*arg2)->value.ht) != zend_hash_num_elements((*arg3)->value.ht)) {
+       if(zend_hash_num_elements(Z_ARRVAL_PP(arg2)) != zend_hash_num_elements(Z_ARRVAL_PP(arg3))) {
                php_error(E_WARNING, "Unequal number of elments in arrays");
                RETURN_FALSE;
        }
 
        /* Turn PHP-Array of strings into C-Array of strings */
-       arrht = (*arg2)->value.ht;
+       arrht = Z_ARRVAL_PP(arg2);
        anchorrecs = make_strs_from_array(arrht);
-       arrht = (*arg3)->value.ht;
+       arrht = Z_ARRVAL_PP(arg3);
        dest = make_strs_from_array(arrht);
 
        if (0 != (error = send_insertanchors(&(hwdoc->data), &count, anchorrecs, dest, zend_hash_num_elements(arrht), urlprefix, &bodytag))) {
@@ -4493,7 +4493,7 @@ PHP_FUNCTION(hw_connection_info)
                WRONG_PARAM_COUNT;
        }
        convert_to_long_ex(arg1);
-       link=(*arg1)->value.lval;
+       link=Z_LVAL_PP(arg1);
        ptr = zend_list_find(link, &type);
        if(!ptr || (type!=le_socketp && type!=le_psocketp)) {
                php_error(E_WARNING, "Unable to find file identifier %d", link);
index 506dfe22190836907beb8beec141f2244645fce3..9600541d049ae00667566613d4b31249a428b827 100644 (file)
@@ -338,7 +338,7 @@ PHP_MINIT_FUNCTION(ifx)
        le_idresult = zend_register_list_destructors_ex(NULL, NULL, "informix id result", module_number);
        le_link     = zend_register_list_destructors_ex(_close_ifx_link,NULL, "informix link",      module_number);
        le_plink    = zend_register_list_destructors_ex(NULL,_close_ifx_plink,"informix persistent link", module_number);
-       ifx_module_entry.type = type;
+       Z_TYPE(ifx_module_entry) = type;
     
        REGISTER_LONG_CONSTANT("IFX_SCROLL",      IFX_SCROLL,  CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("IFX_HOLD",        IFX_HOLD,    CONST_CS | CONST_PERSISTENT);
@@ -513,7 +513,7 @@ EXEC SQL END DECLARE SECTION;
                        }
 
                        /* hash it up */
-                       new_le.type = le_plink;
+                       Z_TYPE(new_le) = le_plink;
                        new_le.ptr = ifx;
                        if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length+1, (void *) &new_le, sizeof(list_entry), NULL)==FAILURE) 
                        {
@@ -524,7 +524,7 @@ EXEC SQL END DECLARE SECTION;
                        IFXG(num_persistent)++;
                        IFXG(num_links)++;
                } else {  /* we do */
-                       if (le->type != le_plink) {
+                       if (Z_TYPE_P(le) != le_plink) {
                                RETURN_FALSE;
                        }
                        /* ensure that the link did not die */
@@ -558,7 +558,7 @@ EXEC SQL END DECLARE SECTION;
                        int type,link;
                        void *ptr;
 
-                       if (index_ptr->type != le_index_ptr) {
+                       if (Z_TYPE_P(index_ptr) != le_index_ptr) {
                                RETURN_FALSE;
                        }
                        link = (int) index_ptr->ptr;
@@ -581,9 +581,9 @@ EXEC SQL END DECLARE SECTION;
                                        }
                                }
                                zend_list_addref(link);
-                               return_value->value.lval = link;
+                               Z_LVAL_P(return_value) = link;
                                php_ifx_set_default_link(link TSRMLS_CC);
-                               return_value->type = IS_RESOURCE;
+                               Z_TYPE_P(return_value) = IS_RESOURCE;
                                efree(hashed_details);
                                return;
                        } else {
@@ -614,8 +614,8 @@ EXEC SQL END DECLARE SECTION;
                ZEND_REGISTER_RESOURCE(return_value, ifx, le_link);
 
                /* add it to the hash */
-               new_index_ptr.ptr = (void *) return_value->value.lval;
-               new_index_ptr.type = le_index_ptr;
+               new_index_ptr.ptr = (void *) Z_LVAL_P(return_value);
+               Z_TYPE(new_index_ptr) = le_index_ptr;
                if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length+1, (void *) &new_index_ptr, sizeof(list_entry), NULL) == FAILURE) 
                {
                        efree(hashed_details);
@@ -624,7 +624,7 @@ EXEC SQL END DECLARE SECTION;
                IFXG(num_links)++;
        }
        efree(hashed_details);
-       php_ifx_set_default_link(return_value->value.lval TSRMLS_CC);
+       php_ifx_set_default_link(Z_LVAL_P(return_value) TSRMLS_CC);
 }
 
 /* {{{ proto int ifx_connect([string database [, string userid [, string password]]])
@@ -865,25 +865,25 @@ EXEC SQL END DECLARE SECTION;
                                RETURN_FALSE;
                        }
 
-                       zend_hash_internal_pointer_reset((*pblobidarr)->value.ht);
+                       zend_hash_internal_pointer_reset(Z_ARRVAL_PP(pblobidarr));
                        i=1;
-                       while (zend_hash_get_current_data((*pblobidarr)->value.ht, (void **) &tmp) == SUCCESS) {
+                       while (zend_hash_get_current_data(Z_ARRVAL_PP(pblobidarr), (void **) &tmp) == SUCCESS) {
                                convert_to_long(*tmp);
                                if ((query_type == SQ_UPDATE) || (query_type == SQ_UPDALL)) {
                                        EXEC SQL SET DESCRIPTOR :descrpid COUNT = :i;
                                }
 
-                               ifx_type=php_intifx_getType((int)(*tmp)->value.lval,&EG(regular_list) TSRMLS_CC);
+                               ifx_type=php_intifx_getType((int)Z_LVAL_PP(tmp),&EG(regular_list) TSRMLS_CC);
                                switch(ifx_type) {
                                        case TYPE_BLTEXT:
                                        case TYPE_BLBYTE:
-                                               locator=php_intifx_get_blobloc((int)((*tmp)->value.lval),&EG(regular_list) TSRMLS_CC);
+                                               locator=php_intifx_get_blobloc((int)(Z_LVAL_PP(tmp)),&EG(regular_list) TSRMLS_CC);
                                                if(locator==NULL) {
                                                        IFXG(sv_sqlcode) = SQLCODE;
                                                        EXEC SQL DEALLOCATE DESCRIPTOR :descrpid;
                                                        EXEC SQL free :statemid;
                                                        efree(Ifx_Result);
-                                                       php_error(E_WARNING,"%d is not a Informix blob-result index", (int)((*tmp)->value.lval));
+                                                       php_error(E_WARNING,"%d is not a Informix blob-result index", (int)(Z_LVAL_PP(tmp)));
                                                        RETURN_FALSE;
                                                }
                                                if(locator->loc_loctype==LOCFNAME) {
@@ -893,7 +893,7 @@ EXEC SQL END DECLARE SECTION;
                                                break;
 
                                        case TYPE_CHAR:
-                                               len=php_intifx_get_char((int)((*tmp)->value.lval),&EG(regular_list),&char_tmp TSRMLS_CC);
+                                               len=php_intifx_get_char((int)(Z_LVAL_PP(tmp)),&EG(regular_list),&char_tmp TSRMLS_CC);
                                                indicator=0;
                                                if(char_tmp==NULL || len<0) {
                                                        indicator=-1;
@@ -908,7 +908,7 @@ EXEC SQL END DECLARE SECTION;
                                                break;
                                }
                                i++;
-                               zend_hash_move_forward((*pblobidarr)->value.ht);
+                               zend_hash_move_forward(Z_ARRVAL_PP(pblobidarr));
                        }
                        Ifx_Result->paramquery=1;  
                        EXEC SQL EXECUTE :statemid USING SQL DESCRIPTOR :descrpid;
@@ -1209,7 +1209,7 @@ EXEC SQL END DECLARE SECTION;
                                RETURN_FALSE;
                        }
 
-                       if((*pblobidarr)->type != IS_ARRAY) {
+                       if(Z_TYPE_PP(pblobidarr) != IS_ARRAY) {
                                IFXG(sv_sqlcode) = SQLCODE;
                                EXEC SQL DEALLOCATE DESCRIPTOR :descrpid;
                                EXEC SQL free :statemid;
@@ -1218,25 +1218,25 @@ EXEC SQL END DECLARE SECTION;
                                RETURN_FALSE;
                        } 
 
-                       zend_hash_internal_pointer_reset((*pblobidarr)->value.ht);
+                       zend_hash_internal_pointer_reset(Z_ARRVAL_PP(pblobidarr));
                        i=1;
-                       while (zend_hash_get_current_data((*pblobidarr)->value.ht, (void **) &tmp) == SUCCESS) {
+                       while (zend_hash_get_current_data(Z_ARRVAL_PP(pblobidarr), (void **) &tmp) == SUCCESS) {
                                convert_to_long(*tmp);
                                if ((query_type == SQ_UPDATE) || (query_type == SQ_UPDALL)) {
                                        EXEC SQL SET DESCRIPTOR :descrpid COUNT = :i;
                                }
                                
-                               ifx_type=php_intifx_getType((int)(*tmp)->value.lval,&EG(regular_list) TSRMLS_CC);
+                               ifx_type=php_intifx_getType((int)Z_LVAL_PP(tmp),&EG(regular_list) TSRMLS_CC);
                                switch(ifx_type) {
                                        case TYPE_BLTEXT:
                                        case TYPE_BLBYTE:
-                                               locator=php_intifx_get_blobloc((int)((*tmp)->value.lval),&EG(regular_list) TSRMLS_CC);
+                                               locator=php_intifx_get_blobloc((int)(Z_LVAL_PP(tmp)),&EG(regular_list) TSRMLS_CC);
                                                if(locator==NULL) {
                                                        IFXG(sv_sqlcode) = SQLCODE;
                                                        EXEC SQL DEALLOCATE DESCRIPTOR :descrpid;
                                                        EXEC SQL free :statemid;
                                                        efree(Ifx_Result);
-                                                       php_error(E_WARNING,"%d is not a Informix blob-result index", (int)((*tmp)->value.lval));
+                                                       php_error(E_WARNING,"%d is not a Informix blob-result index", (int)(Z_LVAL_PP(tmp)));
                                                        RETURN_FALSE;
                                                }
                                                if(locator->loc_loctype==LOCFNAME) {
@@ -1245,7 +1245,7 @@ EXEC SQL END DECLARE SECTION;
                                                EXEC SQL SET DESCRIPTOR :descrpid VALUE :i DATA= :*locator, TYPE=:loc_t_type; 
                                                break;
                                        case TYPE_CHAR:
-                                               len=php_intifx_get_char((int)((*tmp)->value.lval),&EG(regular_list),&char_tmp TSRMLS_CC);
+                                               len=php_intifx_get_char((int)(Z_LVAL_PP(tmp)),&EG(regular_list),&char_tmp TSRMLS_CC);
                                                
                                                indicator=0;
                                                if(char_tmp==NULL || len < 0) {
@@ -1261,7 +1261,7 @@ EXEC SQL END DECLARE SECTION;
                                                break;
                                }
                                i++;
-                               zend_hash_move_forward((*pblobidarr)->value.ht);
+                               zend_hash_move_forward(Z_ARRVAL_PP(pblobidarr));
                        } 
                }
 
@@ -2032,7 +2032,7 @@ EXEC SQL END DECLARE SECTION;
                        if (zend_get_parameters_ex(2, &result, &arg2)==FAILURE) {
                                RETURN_FALSE;
                        }
-                       table_options = (*arg2)->value.str.val;
+                       table_options = Z_STRVAL_PP(arg2);
                        break;
                default:
                        WRONG_PARAM_COUNT;
@@ -2796,7 +2796,7 @@ static long php_intifx_getType(long id, HashTable *list TSRMLS_DC)
                php_error(E_WARNING,"%d is not a Informix id-result index", id);
                return -1;
        }
-       return Ifx_res->type;
+       return IZ_TYPE_P(fx_res);
 }
 
 /* ----------------------------------------------------------------------
@@ -2873,9 +2873,9 @@ static long php_intifx_create_blob(long type, long mode, char* param, long len,
        memset(Ifx_blob, 0, sizeof(IFX_IDRES));
        
        if(type==0 ) {
-               Ifx_blob->type=TYPE_BLBYTE;
+               IZ_TYPE_P(fx_blob)=TYPE_BLBYTE;
        } else {
-               Ifx_blob->type=TYPE_BLTEXT;
+               IZ_TYPE_P(fx_blob)=TYPE_BLTEXT;
        }
        Ifx_blob->BLOB.mode=(int)mode;
 
@@ -2965,7 +2965,7 @@ static long php_intifx_copy_blob(long bid, HashTable *list TSRMLS_DC)
        int type;
 
        Ifx_blob_orig = (IFX_IDRES *) zend_list_find(bid,&type);
-       if (type!=le_idresult || !(Ifx_blob_orig->type==TYPE_BLBYTE || Ifx_blob_orig->type==TYPE_BLTEXT)) {
+       if (type!=le_idresult || !(IZ_TYPE_P(fx_blob_orig)==TYPE_BLBYTE || IZ_TYPE_P(fx_blob_orig)==TYPE_BLTEXT)) {
                php_error(E_WARNING,"%d is not a Informix blob-result index", bid);
                return -1;
        }
@@ -2978,7 +2978,7 @@ static long php_intifx_copy_blob(long bid, HashTable *list TSRMLS_DC)
        
        memset(Ifx_blob, 0, sizeof(IFX_IDRES));
   
-       Ifx_blob->type=Ifx_blob_orig->type;
+       IZ_TYPE_P(fx_blob)=IZ_TYPE_P(fx_blob_orig);
        Ifx_blob->BLOB.mode=Ifx_blob_orig->BLOB.mode;
  
        locator=&(Ifx_blob->BLOB.blob_data);
@@ -3041,7 +3041,7 @@ PHP_FUNCTION(ifx_free_blob)
        }
        convert_to_long(pid);
 
-       ret=php_intifx_free_blob(pid->value.lval,&EG(regular_list) TSRMLS_CC); 
+       ret=php_intifx_free_blob(Z_LVAL_P(pid),&EG(regular_list) TSRMLS_CC); 
        if(ret<0) {
                RETURN_FALSE;
        } 
@@ -3067,7 +3067,7 @@ static long php_intifx_free_blob(long bid, HashTable *list TSRMLS_DC)
        int type;
 
        Ifx_blob = (IFX_IDRES *) zend_list_find(bid,&type);
-       if (type!=le_idresult && !(Ifx_blob->type==TYPE_BLTEXT || Ifx_blob->type==TYPE_BLBYTE)) {
+       if (type!=le_idresult && !(IZ_TYPE_P(fx_blob)==TYPE_BLTEXT || IZ_TYPE_P(fx_blob)==TYPE_BLBYTE)) {
                php_error(E_WARNING,"%d is not a Informix blob-result index", bid);
                return -1;
        }
@@ -3105,7 +3105,7 @@ static long php_intifx2_free_blob(long bid, HashTable *list TSRMLS_DC)
        int type;
 
        Ifx_blob = (IFX_IDRES *) zend_list_find(bid,&type);
-       if (type!=le_idresult && !(Ifx_blob->type==TYPE_BLTEXT || Ifx_blob->type==TYPE_BLBYTE)) {
+       if (type!=le_idresult && !(IZ_TYPE_P(fx_blob)==TYPE_BLTEXT || IZ_TYPE_P(fx_blob)==TYPE_BLBYTE)) {
                php_error(E_WARNING,"%d is not a Informix blob-result index", bid);
                return -1;
        }
@@ -3152,7 +3152,7 @@ PHP_FUNCTION(ifx_get_blob)
        }
        convert_to_long(pbid);
 
-       len=php_intifx_get_blob(pbid->value.lval,&EG(regular_list),&content TSRMLS_CC); 
+       len=php_intifx_get_blob(Z_LVAL_P(pbid),&EG(regular_list),&content TSRMLS_CC); 
        if(content==NULL || len<0) {
                RETURN_STRING(php_intifx_null(TSRMLS_C),1);
        }
@@ -3178,7 +3178,7 @@ static long php_intifx_get_blob(long bid, HashTable *list, char** content TSRMLS
        int type;
 
        Ifx_blob = (IFX_IDRES *) zend_list_find(bid,&type);
-       if (type!=le_idresult && !(Ifx_blob->type==TYPE_BLTEXT || Ifx_blob->type==TYPE_BLBYTE)) {
+       if (type!=le_idresult && !(IZ_TYPE_P(fx_blob)==TYPE_BLTEXT || IZ_TYPE_P(fx_blob)==TYPE_BLBYTE)) {
                php_error(E_WARNING,"%d is not a Informix blob-result index", bid);
                return -1;
        }
@@ -3207,7 +3207,7 @@ static loc_t *php_intifx_get_blobloc(long bid, HashTable *list TSRMLS_DC)
        int type;
 
        Ifx_blob = (IFX_IDRES *) zend_list_find(bid,&type);
-       if (type!=le_idresult && !(Ifx_blob->type==TYPE_BLTEXT || Ifx_blob->type==TYPE_BLBYTE)) {
+       if (type!=le_idresult && !(IZ_TYPE_P(fx_blob)==TYPE_BLTEXT || IZ_TYPE_P(fx_blob)==TYPE_BLBYTE)) {
                php_error(E_WARNING,"%d is not a Informix blob-result index", bid);
                return NULL;
        }
@@ -3263,7 +3263,7 @@ static long php_intifx_update_blob(long bid, char* param, long len, HashTable *l
        int type;
 
        Ifx_blob = (IFX_IDRES *) zend_list_find(bid,&type);
-       if (type!=le_idresult && !(Ifx_blob->type==TYPE_BLTEXT || Ifx_blob->type==TYPE_BLBYTE)) {
+       if (type!=le_idresult && !(IZ_TYPE_P(fx_blob)==TYPE_BLTEXT || IZ_TYPE_P(fx_blob)==TYPE_BLBYTE)) {
                php_error(E_WARNING,"%d is not a Informix blob-result index", bid);
                return -1;
        }
@@ -3511,7 +3511,7 @@ static long php_intifx_create_char(char* param, long len, HashTable *list)
                return -1;
        }
 
-       Ifx_char->type=TYPE_CHAR;
+       IZ_TYPE_P(fx_char)=TYPE_CHAR;
 
        if(param==NULL || len<0) {
                Ifx_char->CHAR.char_data=NULL;
@@ -3578,7 +3578,7 @@ static long php_intifx_get_char(long bid, HashTable *list, char** content TSRMLS
        int type;
 
        Ifx_char = (IFX_IDRES *) zend_list_find(bid,&type);
-       if (type!=le_idresult && !(Ifx_char->type==TYPE_CHAR)) {
+       if (type!=le_idresult && !(IZ_TYPE_P(fx_char)==TYPE_CHAR)) {
                php_error(E_WARNING,"%d is not a Informix char-result index", bid);
                return -1;
        }
@@ -3631,7 +3631,7 @@ static long php_intifx_free_char(long bid, HashTable *list TSRMLS_DC)
        int type;
 
        Ifx_char = (IFX_IDRES *) zend_list_find(bid,&type);
-       if (type!=le_idresult && !(Ifx_char->type==TYPE_CHAR)) {
+       if (type!=le_idresult && !(IZ_TYPE_P(fx_char)==TYPE_CHAR)) {
                php_error(E_WARNING,"%d is not a Informix char-result index", bid);
                return -1;
        }
@@ -3691,7 +3691,7 @@ static long php_intifx_update_char(long bid, char* param, long len, HashTable *l
        int type;
 
        Ifx_char = (IFX_IDRES *) zend_list_find(bid,&type);
-       if (type!=le_idresult && !(Ifx_char->type==TYPE_CHAR)) {
+       if (type!=le_idresult && !(IZ_TYPE_P(fx_char)==TYPE_CHAR)) {
                php_error(E_WARNING,"%d is not a Informix char-result index", bid);
                return -1;
        }
@@ -3793,7 +3793,7 @@ static long php_intifxus_create_slob(long create_mode, HashTable *list)
                return -1;
        }
 
-       Ifx_slob->type=TYPE_SLOB;
+       IZ_TYPE_P(fx_slob)=TYPE_SLOB;
        Ifx_slob->SLOB.lofd=ifx_lo_create(Ifx_slob->SLOB.createspec,create_mode,&(Ifx_slob->SLOB.slob_data),&errcode);
        if(errcode<0 || Ifx_slob->SLOB.lofd<0) {
                php_error(E_WARNING,"can't create slob-resource: %d", errcode);
@@ -3846,7 +3846,7 @@ static long php_intifxus_free_slob(long bid, HashTable *list TSRMLS_DC)
        int type;
        
        Ifx_slob = (IFX_IDRES *) zend_list_find(bid,&type);
-       if (type!=le_idresult || Ifx_slob->type!=TYPE_SLOB) {
+       if (type!=le_idresult || IZ_TYPE_P(fx_slob)!=TYPE_SLOB) {
                php_error(E_WARNING,"%d is not a Informix slob-result index", bid);
                return -1;
        }
@@ -3907,7 +3907,7 @@ static long php_intifxus_close_slob(long bid, HashTable *list TSRMLS_DC)
        int type;
 
        Ifx_slob = (IFX_IDRES *) zend_list_find(bid,&type);
-       if (type!=le_idresult || Ifx_slob->type!=TYPE_SLOB) {
+       if (type!=le_idresult || IZ_TYPE_P(fx_slob)!=TYPE_SLOB) {
                php_error(E_WARNING,"%d is not a Informix slob-result index", bid);
                return -1;
        }
@@ -3985,7 +3985,7 @@ static long php_intifxus_open_slob(long bid, long create_mode, HashTable *list T
        int type;
 
        Ifx_slob = (IFX_IDRES *) zend_list_find(bid,&type);
-       if (type!=le_idresult || Ifx_slob->type!=TYPE_SLOB) {
+       if (type!=le_idresult || IZ_TYPE_P(fx_slob)!=TYPE_SLOB) {
                php_error(E_WARNING,"%d is not a Informix slob-result index", bid);
                return -1;
        }
@@ -4022,7 +4022,7 @@ static long php_intifxus_new_slob(HashTable *list)
                return -1;
        }
        
-       Ifx_slob->type=TYPE_SLOB;
+       IZ_TYPE_P(fx_slob)=TYPE_SLOB;
        Ifx_slob->SLOB.lofd=-1;
        Ifx_slob->SLOB.createspec=NULL;
        return zend_list_insert(Ifx_slob,le_idresult);
@@ -4043,7 +4043,7 @@ static ifx_lo_t *php_intifxus_get_slobloc(long bid, HashTable *list TSRMLS_DC)
        int type;
 
        Ifx_slob = (IFX_IDRES *) zend_list_find(bid,&type);
-       if (type!=le_idresult  || Ifx_slob->type!=TYPE_SLOB) {
+       if (type!=le_idresult  || IZ_TYPE_P(fx_slob)!=TYPE_SLOB) {
                php_error(E_WARNING,"%d is not a Informix slob-result index", bid);
                return NULL;
        }
@@ -4077,7 +4077,7 @@ PHP_FUNCTION(ifxus_tell_slob)
        bid=Z_LVAL_P(pbid);
 
        Ifx_slob = (IFX_IDRES *) zend_list_find(bid,&type);
-       if (type!=le_idresult || Ifx_slob->type!=TYPE_SLOB) {
+       if (type!=le_idresult || IZ_TYPE_P(fx_slob)!=TYPE_SLOB) {
                php_error(E_WARNING,"%d is not a Informix slob-result index", bid);
                RETURN_FALSE;
        }
@@ -4125,7 +4125,7 @@ PHP_FUNCTION(ifxus_seek_slob)
  
        bid=Z_LVAL_P(pbid);
        Ifx_slob = (IFX_IDRES *) zend_list_find(bid,&type);
-       if (type!=le_idresult || Ifx_slob->type!=TYPE_SLOB) {
+       if (type!=le_idresult || IZ_TYPE_P(fx_slob)!=TYPE_SLOB) {
                php_error(E_WARNING,"%d is not a Informix slob-result index", bid);
                RETURN_FALSE;
        }
@@ -4180,7 +4180,7 @@ PHP_FUNCTION(ifxus_read_slob)
  
        bid=Z_LVAL_P(pbid);
        Ifx_slob = (IFX_IDRES *) zend_list_find(bid,&type);
-       if (type!=le_idresult || Ifx_slob->type!=TYPE_SLOB) {
+       if (type!=le_idresult || IZ_TYPE_P(fx_slob)!=TYPE_SLOB) {
                php_error(E_WARNING,"%d is not a Informix slob-result index", bid);
                RETURN_FALSE;
        }
@@ -4224,7 +4224,7 @@ PHP_FUNCTION(ifxus_write_slob)
  
        bid=Z_LVAL_P(pbid);
        Ifx_slob = (IFX_IDRES *) zend_list_find(bid,&type);
-       if (type!=le_idresult || Ifx_slob->type!=TYPE_SLOB) {
+       if (type!=le_idresult || IZ_TYPE_P(fx_slob)!=TYPE_SLOB) {
                php_error(E_WARNING,"%d is not a Informix slob-result index", bid);
                RETURN_FALSE;
        }
index cf6bba89b412d0b2022c9422676ed2614650b145..ab1a0a2e5d60f1be785487100e3dfd278bfa57cd 100644 (file)
@@ -709,38 +709,38 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
        switch(ZEND_NUM_ARGS()) {
                case 7:
                        convert_to_string_ex(args[6]);
-                       ib_role = (*args[6])->value.str.val;
-                       hashed_details_length += (*args[6])->value.str.len;
+                       ib_role = Z_STRVAL_PP(args[6]);
+                       hashed_details_length += Z_STRLEN_PP(args[6]);
                        /* fallout */
                case 6:
                        convert_to_string_ex(args[5]);
-                       ib_dialect = (*args[5])->value.str.val;
-                       hashed_details_length += (*args[5])->value.str.len;
+                       ib_dialect = Z_STRVAL_PP(args[5]);
+                       hashed_details_length += Z_STRLEN_PP(args[5]);
                        /* fallout */
                case 5:
                        convert_to_string_ex(args[4]);
-                       ib_buffers = (*args[4])->value.str.val;
-                       hashed_details_length += (*args[4])->value.str.len;
+                       ib_buffers = Z_STRVAL_PP(args[4]);
+                       hashed_details_length += Z_STRLEN_PP(args[4]);
                        /* fallout */
                case 4:
                        convert_to_string_ex(args[3]);
-                       ib_charset = (*args[3])->value.str.val;
-                       hashed_details_length += (*args[3])->value.str.len;
+                       ib_charset = Z_STRVAL_PP(args[3]);
+                       hashed_details_length += Z_STRLEN_PP(args[3]);
                        /* fallout */
                case 3:
                        convert_to_string_ex(args[2]);
-                       ib_passwd = (*args[2])->value.str.val;
-                       hashed_details_length += (*args[2])->value.str.len;
+                       ib_passwd = Z_STRVAL_PP(args[2]);
+                       hashed_details_length += Z_STRLEN_PP(args[2]);
                        /* fallout */
                case 2:
                        convert_to_string_ex(args[1]);
-                       ib_uname = (*args[1])->value.str.val;
-                       hashed_details_length += (*args[1])->value.str.len;
+                       ib_uname = Z_STRVAL_PP(args[1]);
+                       hashed_details_length += Z_STRLEN_PP(args[1]);
                        /* fallout */
                case 1:
                        convert_to_string_ex(args[0]);
-                       ib_server = (*args[0])->value.str.val;
-                       hashed_details_length += (*args[0])->value.str.len;
+                       ib_server = Z_STRVAL_PP(args[0]);
+                       hashed_details_length += Z_STRLEN_PP(args[0]);
        } /* case */
        
        efree(args);
@@ -1497,7 +1497,7 @@ PHP_FUNCTION(ibase_trans)
 
                /* First argument is transaction parameters */
                convert_to_long_ex(args[0]);
-               trans_argl = (*args[0])->value.lval;
+               trans_argl = Z_LVAL_PP(args[0]);
 
                efree(args);
        }
@@ -2299,10 +2299,10 @@ PHP_FUNCTION(ibase_timefmt)
        switch (ZEND_NUM_ARGS()) {
                case 2:
                        convert_to_long_ex(args[1]);
-                       type = (*args[1])->value.lval;
+                       type = Z_LVAL_PP(args[1]);
                case 1:
                        convert_to_string_ex(args[0]);
-                       fmt = (*args[0])->value.str.val;
+                       fmt = Z_STRVAL_PP(args[0]);
        }
 
        switch (type) {
index 0780c4b7b7d7cbee53a5938c184b51cee211674f..af8c7fd3fb0a8800b0277372b781b3e570e166ab 100644 (file)
@@ -438,7 +438,7 @@ void java_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_refe
       return;
     }
 
-    className=(*jenv)->NewStringUTF(jenv, arguments[0]->value.str.val);
+    className=(*jenv)->NewStringUTF(jenv, Z_STRVAL_P(arguments[0]));
     (*jenv)->CallVoidMethod(jenv, JG(php_reflect), co,
       className, _java_makeArray(arg_count-1, arguments+1 TSRMLS_CC), result);
 
index 95ff13da7c33d0f542383745b25cec574898c285..28e1670b81660aa5d19ac97258ac1322b41a503d 100644 (file)
@@ -934,7 +934,7 @@ PHP_FUNCTION(ldap_get_entries)
                        ldap_value_free(ldap_value);
 
                        attr_len = strlen(attribute);
-                       zend_hash_update(tmp1->value.ht, php_strtolower(attribute, attr_len), attr_len+1, (void *) &tmp2, sizeof(pval *), NULL);
+                       zend_hash_update(Z_ARRVAL_P(tmp1), php_strtolower(attribute, attr_len), attr_len+1, (void *) &tmp2, sizeof(pval *), NULL);
                        add_index_string(tmp1, num_attrib, attribute, 1);
 
                        num_attrib++;
index cde6b56700437bb5579b40d33fd970b374f633ee..af2bcfb23d2b68ad743951b200f7079703db05f6 100644 (file)
@@ -1637,7 +1637,7 @@ PHP_FUNCTION(mb_strcut)
         * of the string
         */
        if (from < 0) {
-               from = (*arg1)->value.str.len + from;
+               from = Z_STRLEN_PP(arg1) + from;
                if (from < 0) {
                        from = 0;
                }
@@ -1647,7 +1647,7 @@ PHP_FUNCTION(mb_strcut)
         * needed to stop that many chars from the end of the string
         */
        if (len < 0) {
-               len = ((*arg1)->value.str.len - from) + len;
+               len = (Z_STRLEN_PP(arg1) - from) + len;
                if (len < 0) {
                        len = 0;
                }
@@ -2422,7 +2422,7 @@ php_mbstr_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type)
        /* conversion map */
        convmap = NULL;
        if (Z_TYPE_PP(arg2) == IS_ARRAY){
-               target_hash = (*arg2)->value.ht;
+               target_hash = Z_ARRVAL_PP(arg2);
                zend_hash_internal_pointer_reset(target_hash);
                i = zend_hash_num_elements(target_hash);
                if (i > 0) {
@@ -2602,7 +2602,7 @@ PHP_FUNCTION(mb_send_mail)
 
        if (argc == 5) {        /* extra options that get passed to the mailer */
                convert_to_string_ex(argv[4]);
-               extra_cmd = (*argv[4])->value.str.val;
+               extra_cmd = Z_STRVAL_PP(argv[4]);
        }
 
        if (!err && php_mail(to, subject, message, headers, extra_cmd)){
index 4dbc3e961ab864b8e0e3d49a7030b9c0aa031b22..153f630f33b12375c26fa2a70f3a6b2193fd91c4 100644 (file)
@@ -824,7 +824,7 @@ PHP_FUNCTION(mcrypt_module_self_test)
 
        MCRYPT_GET_MODE_DIR_ARGS(algorithms_dir);
        
-       if (mcrypt_module_self_test ((*arg1)->value.str.val, lib_dir_s) == 0) {
+       if (mcrypt_module_self_test (Z_STRVAL_PP(arg1), lib_dir_s) == 0) {
                RETURN_TRUE;
        }
        else {
@@ -846,7 +846,7 @@ PHP_FUNCTION(mcrypt_module_is_block_algorithm_mode)
 
        MCRYPT_GET_MODE_DIR_ARGS(modes_dir)
        
-       if (mcrypt_module_is_block_algorithm_mode ((*arg1)->value.str.val, lib_dir_s) == 0) {
+       if (mcrypt_module_is_block_algorithm_mode (Z_STRVAL_PP(arg1), lib_dir_s) == 0) {
                RETURN_TRUE;
        }
        else {
@@ -868,7 +868,7 @@ PHP_FUNCTION(mcrypt_module_is_block_algorithm)
 
        MCRYPT_GET_MODE_DIR_ARGS(algorithms_dir)
        
-       if (mcrypt_module_is_block_algorithm ((*arg1)->value.str.val, lib_dir_s) == 0) {
+       if (mcrypt_module_is_block_algorithm (Z_STRVAL_PP(arg1), lib_dir_s) == 0) {
                RETURN_TRUE;
        }
        else {
@@ -890,7 +890,7 @@ PHP_FUNCTION(mcrypt_module_is_block_mode)
 
        MCRYPT_GET_MODE_DIR_ARGS(modes_dir)
        
-       if (mcrypt_module_is_block_mode ((*arg1)->value.str.val, lib_dir_s) == 0) {
+       if (mcrypt_module_is_block_mode (Z_STRVAL_PP(arg1), lib_dir_s) == 0) {
                RETURN_TRUE;
        }
        else {
@@ -912,7 +912,7 @@ PHP_FUNCTION(mcrypt_module_get_algo_block_size)
 
        MCRYPT_GET_MODE_DIR_ARGS(algorithms_dir)
        
-       RETURN_LONG(mcrypt_module_get_algo_block_size ((*arg1)->value.str.val, lib_dir_s))
+       RETURN_LONG(mcrypt_module_get_algo_block_size (Z_STRVAL_PP(arg1), lib_dir_s))
 }
 /* }}} */
 
@@ -929,7 +929,7 @@ PHP_FUNCTION(mcrypt_module_get_algo_key_size)
 
        MCRYPT_GET_MODE_DIR_ARGS(algorithms_dir);
        
-       RETURN_LONG(mcrypt_module_get_algo_key_size ((*arg1)->value.str.val, lib_dir_s))
+       RETURN_LONG(mcrypt_module_get_algo_key_size (Z_STRVAL_PP(arg1), lib_dir_s))
 }
 /* }}} */
 
@@ -947,7 +947,7 @@ PHP_FUNCTION(mcrypt_module_get_supported_key_sizes)
 
        MCRYPT_GET_MODE_DIR_ARGS(algorithms_dir)
 
-       key_sizes = mcrypt_module_get_algo_supported_key_sizes ((*arg1)->value.str.val, lib_dir_s, &count);
+       key_sizes = mcrypt_module_get_algo_supported_key_sizes (Z_STRVAL_PP(arg1), lib_dir_s, &count);
 
        if (array_init(return_value) == FAILURE) {
                php_error(E_ERROR, "Unable to initialize array");
index ddb916634534751bc785386f97179fde919b0be4..90ea8d809fed1d654a5e4e2f9410109fe8b868a3 100644 (file)
@@ -1870,7 +1870,7 @@ PHP_FUNCTION(swfshape_addfill)
 
     convert_to_object_ex(arg1);
 
-    if((*arg1)->value.obj.ce == &gradient_class_entry)
+    if(Z_OBJCE_PP(arg1) == &gradient_class_entry)
     {
       if(flags == 0)
        flags = SWFFILL_LINEAR_GRADIENT;
@@ -1878,7 +1878,7 @@ PHP_FUNCTION(swfshape_addfill)
       fill = SWFShape_addGradientFill(getShape(getThis() TSRMLS_CC), getGradient(*arg1 TSRMLS_CC),
                                      flags);
     }
-    else if((*arg1)->value.obj.ce == &bitmap_class_entry)
+    else if(Z_OBJCE_PP(arg1) == &bitmap_class_entry)
     {
       if(flags == 0)
        flags = SWFFILL_TILED_BITMAP;
index 70c0480bcc47ae0534e11636595117fdd6432972..a9cfe411e48b783ae65a15c37d42a203c6303017 100644 (file)
@@ -646,8 +646,8 @@ DLEXPORT PHP_FUNCTION(udm_load_ispell_data)
                        ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, -1, "mnoGoSearch-agent", le_link);
                        var  = Z_LVAL_PP(yyvar);
                        flag = Z_LVAL_PP(yyflag);
-                       val1 = (*yyval1)->value.str.val;
-                       val2 = (*yyval2)->value.str.val;
+                       val1 = Z_STRVAL_PP(yyval1);
+                       val2 = Z_STRVAL_PP(yyval2);
                        
                        break;
                        
index bf266d6afdc15901158f8fa900a361c971509dbd..06069a731efe1dc439b12872a4c5e4e28d572f09 100644 (file)
@@ -916,7 +916,7 @@ static void php_msql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
                                RETURN_FALSE;
                        }
                        convert_to_long(arg2);
-                       result_type = arg2->value.lval;
+                       result_type = Z_LVAL_P(arg2);
                        break;
                default:
                        WRONG_PARAM_COUNT;
index 9b44b4c9583a51a16524fe978b830d95194f2877..f6cdd17b9d71d96f8fb1bfa6e7c29f18cee8f0ed 100644 (file)
@@ -1541,7 +1541,7 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type,
                                RETURN_FALSE;
                        }
                        convert_to_long_ex(arg2);
-                       result_type = (*arg2)->value.lval;
+                       result_type = Z_LVAL_PP(arg2);
                        break;
                default:
                        WRONG_PARAM_COUNT;
index a871a6d281489418d8b9195c2e062d29cc027ed3..458b0a97389190d2fa545ef7aea1c4d7b9d81c1f 100644 (file)
@@ -2518,15 +2518,15 @@ static void oci_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent,int exclu
                convert_to_string_ex(passParam);
                convert_to_string_ex(dbParam);
 
-               username = (*userParam)->value.str.val;
-               password = (*passParam)->value.str.val;
-               dbname = (*dbParam)->value.str.val;
+               username = Z_STRVAL_PP(userParam);
+               password = Z_STRVAL_PP(passParam);
+               dbname = Z_STRVAL_PP(dbParam);
     } else if (zend_get_parameters_ex(2, &userParam, &passParam) == SUCCESS) {
                convert_to_string_ex(userParam);
                convert_to_string_ex(passParam);
 
-               username = (*userParam)->value.str.val;
-               password = (*passParam)->value.str.val;
+               username = Z_STRVAL_PP(userParam);
+               password = Z_STRVAL_PP(passParam);
                dbname = "";
     } else {
                WRONG_PARAM_COUNT;
index 3716cad895559e3748d472e0121075bd6cd7758f..9b20a0ffe735ef87e9ab997f0ad2448ada7505cf 100644 (file)
@@ -430,8 +430,8 @@ void ora_do_logon(INTERNAL_FUNCTION_PARAMETERS, int persistent)
        convert_to_string_ex(arg1);
        convert_to_string_ex(arg2);
   
-       user = (*arg1)->value.str.val;
-       passwd = (*arg2)->value.str.val;
+       user = Z_STRVAL_PP(arg1);
+       passwd = Z_STRVAL_PP(arg2);
 
        hashed_details_length = sizeof("oracle__")-1+strlen(user)+strlen(passwd);
        hashed_details = (char *) emalloc(hashed_details_length+1);
index 836480e0c5c5778eae4661f3d0e4f7a5e3e581af..e9f8098c7542f215774f95dd017ddbb27f4f41e2 100644 (file)
@@ -96,8 +96,8 @@ PHP_FUNCTION(ovrimos_connect)
        convert_to_string(arg4);
 
        if (!sqlConnect
-           (arg1->value.str.val, arg2->value.str.val, arg3->value.str.val,
-            arg4->value.str.val, &conn, 0)) {
+           (Z_STRVAL_P(arg1), Z_STRVAL_P(arg2), Z_STRVAL_P(arg3),
+            Z_STRVAL_P(arg4), &conn, 0)) {
                RETURN_LONG(0);
        }
        
@@ -122,11 +122,11 @@ PHP_FUNCTION(ovrimos_close)
        PCON_STATE state;
 
        if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE
-           || arg1->type != IS_LONG) {
+           || Z_TYPE_P(arg1) != IS_LONG) {
                WRONG_PARAM_COUNT;
        }
 
-       state = (PCON_STATE) arg1->value.lval;
+       state = (PCON_STATE) Z_LVAL_P(arg1);
 
        /* free all the statements associated with 
         * the connection. (called results in php)
@@ -165,9 +165,9 @@ PHP_FUNCTION(ovrimos_longreadlen)
        convert_to_long(arg1);
        convert_to_long(arg2);
 
-       stmt = (PSTATEMENT) arg1->value.lval;
+       stmt = (PSTATEMENT) Z_LVAL_P(arg1);
 
-       stmt->longreadlen = arg2->value.lval;
+       stmt->longreadlen = Z_LVAL_P(arg2);
        RETURN_TRUE;
 }
 
@@ -250,10 +250,10 @@ PHP_FUNCTION(ovrimos_prepare)
        convert_to_long(arg1);
        convert_to_string(arg2);
        
-       state = (PCON_STATE) arg1->value.lval;
+       state = (PCON_STATE) Z_LVAL_P(arg1);
 
        conn = (SQLH) state->connection;
-       query = arg2->value.str.val;
+       query = Z_STRVAL_P(arg2);
 
        if (!local_sqlAllocStmt( state, conn, &stmt, &pstmt)) {
                RETURN_FALSE;
@@ -299,7 +299,7 @@ PHP_FUNCTION(ovrimos_execute)
        }
 
        convert_to_long(arg1);
-       pstmt = (PSTATEMENT) arg1->value.lval;
+       pstmt = (PSTATEMENT) Z_LVAL_P(arg1);
 
        stmt = pstmt->statement;
        colnb = sqlGetParamNb(stmt);
@@ -308,12 +308,12 @@ PHP_FUNCTION(ovrimos_execute)
                pval **tmp;
                int arr_elem;
 
-               if (arg2->type != IS_ARRAY) {
+               if (Z_TYPE_P(arg2) != IS_ARRAY) {
                        php_error(E_WARNING,
                                  "Not an array in call to ovrimos_execute()");
                        RETURN_FALSE;
                }
-               arr_elem = zend_hash_num_elements(arg2->value.ht);
+               arr_elem = zend_hash_num_elements(Z_ARRVAL_P(arg2));
                if (arr_elem < colnb) {
                        php_error(E_WARNING,
                                  "Not enough parameters in call to ovrimos_execute(): %d instead of %d",
@@ -321,7 +321,7 @@ PHP_FUNCTION(ovrimos_execute)
                        RETURN_FALSE;
                }
 
-               zend_hash_internal_pointer_reset(arg2->value.ht);
+               zend_hash_internal_pointer_reset(Z_ARRVAL_P(arg2));
 
                for (icol = 0; icol < colnb; icol++) {
                        int len;
@@ -333,7 +333,7 @@ PHP_FUNCTION(ovrimos_execute)
                        sql_type from_type;
 
                        if (zend_hash_get_current_data
-                           (arg2->value.ht, (void **) &tmp) == FAILURE) {
+                           (Z_ARRVAL_P(arg2), (void **) &tmp) == FAILURE) {
                                php_error(E_WARNING,
                                          "Error getting parameter %d in call to ovrimos_execute()",
                                          icol);
@@ -420,7 +420,7 @@ PHP_FUNCTION(ovrimos_cursor)
        }
        convert_to_long(arg1);
 
-       pstmt = (PSTATEMENT) arg1->value.lval;
+       pstmt = (PSTATEMENT) Z_LVAL_P(arg1);
        stmt = pstmt->statement;
 
        if (!sqlGetCursorName(stmt, cname)) {
@@ -456,9 +456,9 @@ PHP_FUNCTION(ovrimos_exec)
        convert_to_long(arg1);
        convert_to_string(arg2);
 
-       state = (PCON_STATE) arg1->value.lval;
+       state = (PCON_STATE) Z_LVAL_P(arg1);
        conn = state->connection;
-       query = arg2->value.str.val;
+       query = Z_STRVAL_P(arg2);
 
        if (!local_sqlAllocStmt( state, conn, &stmt, &pstmt)) {
                RETURN_FALSE;
@@ -925,7 +925,7 @@ PHP_FUNCTION(ovrimos_result_all)
        }
 
        convert_to_long(arg1);
-       pstmt = (PSTATEMENT) arg1->value.lval;
+       pstmt = (PSTATEMENT) Z_LVAL_P(arg1);
        stmt = (SQLS) pstmt->statement;
 
        colnb = sqlGetOutputColNb(stmt);
@@ -935,7 +935,7 @@ PHP_FUNCTION(ovrimos_result_all)
                php_printf("<table><tr>");
        } else {
                convert_to_string(arg2);
-               php_printf("<table %s ><tr>", arg2->value.str.val);
+               php_printf("<table %s ><tr>", Z_STRVAL_P(arg2));
        }
 
        for (icol = 0; icol < colnb; icol++) {
@@ -974,7 +974,7 @@ PHP_FUNCTION(ovrimos_free_result)
                WRONG_PARAM_COUNT;
        }
        convert_to_long(arg1);
-       pstmt = (PSTATEMENT) arg1->value.lval;
+       pstmt = (PSTATEMENT) Z_LVAL_P(arg1);
        stmt = (SQLS) pstmt->statement;
 
        sqlCloseCursor( stmt);
@@ -998,7 +998,7 @@ PHP_FUNCTION(ovrimos_num_rows)
        }
 
        convert_to_long(arg1);
-       pstmt = (PSTATEMENT) arg1->value.lval;
+       pstmt = (PSTATEMENT) Z_LVAL_P(arg1);
        stmt = (SQLS) pstmt->statement;
 
 
@@ -1021,7 +1021,7 @@ PHP_FUNCTION(ovrimos_num_fields)
        }
 
        convert_to_long(arg1);
-       pstmt = (PSTATEMENT) arg1->value.lval;
+       pstmt = (PSTATEMENT) Z_LVAL_P(arg1);
 
        stmt = (SQLS) pstmt->statement;
 
@@ -1045,18 +1045,18 @@ PHP_FUNCTION(ovrimos_field_name)
 
        convert_to_long(arg1);
        convert_to_long(arg2);
-       pstmt = (PSTATEMENT) arg1->value.lval;
+       pstmt = (PSTATEMENT) Z_LVAL_P(arg1);
 
        stmt = (SQLS) pstmt->statement;
 
 
-       if (arg2->value.lval < 1) {
+       if (Z_LVAL_P(arg2) < 1) {
                php_error(E_WARNING,
                          "Field numbering starts at 1! in call to ovrimos_field_name()");
                RETURN_FALSE;
        }
 
-       field = arg2->value.lval - 1;
+       field = Z_LVAL_P(arg2) - 1;
 
        if (field >= sqlGetOutputColNb(stmt)) {
                php_error(E_WARNING,
@@ -1085,17 +1085,17 @@ PHP_FUNCTION(ovrimos_field_type)
 
        convert_to_long(arg1);
        convert_to_long(arg2);
-       pstmt = (PSTATEMENT) arg1->value.lval;
+       pstmt = (PSTATEMENT) Z_LVAL_P(arg1);
 
        stmt = (SQLS) pstmt->statement;
 
-       if (arg2->value.lval < 1) {
+       if (Z_LVAL_P(arg2) < 1) {
                php_error(E_WARNING,
                          "Field numbering starts at 1! in call to ovrimos_field_type()");
                RETURN_FALSE;
        }
 
-       field = arg2->value.lval - 1;
+       field = Z_LVAL_P(arg2) - 1;
 
        if (field >= sqlGetOutputColNb(stmt)) {
                php_error(E_WARNING,
@@ -1125,19 +1125,19 @@ PHP_FUNCTION(ovrimos_field_len)
 
        convert_to_long(arg1);
        convert_to_long(arg2);
-       pstmt = (PSTATEMENT) arg1->value.lval;
+       pstmt = (PSTATEMENT) Z_LVAL_P(arg1);
 
        longreadlen = pstmt->longreadlen;
 
        stmt = (SQLS) pstmt->statement;
 
-       if (arg2->value.lval < 1) {
+       if (Z_LVAL_P(arg2) < 1) {
                php_error(E_WARNING,
                          "Field numbering starts at 1! in call to ovrimos_field_len()");
                RETURN_FALSE;
        }
 
-       field = arg2->value.lval - 1;
+       field = Z_LVAL_P(arg2) - 1;
 
        if (field >= sqlGetOutputColNb(stmt)) {
                php_error(E_WARNING,
@@ -1167,17 +1167,17 @@ PHP_FUNCTION(ovrimos_field_num)
        PSTATEMENT pstmt;
 
        if (getParameters(ht, 2, &arg1, &arg2) == FAILURE
-           || arg2->type != IS_STRING) {
+           || Z_TYPE_P(arg2) != IS_STRING) {
                WRONG_PARAM_COUNT;
        }
        convert_to_long(arg1);
-       pstmt = (PSTATEMENT) arg1->value.lval;
+       pstmt = (PSTATEMENT) Z_LVAL_P(arg1);
        stmt = (SQLS) pstmt->statement;
 
        n = sqlGetOutputColNb(stmt);
        for (i = 0; i < n; i++) {
                if (!strcmp
-                   (arg2->value.str.val, sqlGetOutputColName(stmt, i))) {
+                   (Z_STRVAL_P(arg2), sqlGetOutputColName(stmt, i))) {
                        RETURN_LONG(i + 1);
                }
        }
@@ -1207,12 +1207,12 @@ PHP_FUNCTION(ovrimos_commit)
        PCON_STATE state;
        
        if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE
-           || arg1->type != IS_LONG) {
+           || Z_TYPE_P(arg1) != IS_LONG) {
                WRONG_PARAM_COUNT;
        }
 
        convert_to_long( arg1);
-       state = (PCON_STATE) arg1->value.lval;
+       state = (PCON_STATE) Z_LVAL_P(arg1);
 
        for (i=0;i<state->nstatements;i++) {
                stmt = state->statements[ i].statement;
@@ -1238,12 +1238,12 @@ PHP_FUNCTION(ovrimos_rollback)
        PCON_STATE state;
        
        if (ARG_COUNT(ht) != 1 || getParameters(ht, 1, &arg1) == FAILURE
-           || arg1->type != IS_LONG) {
+           || Z_TYPE_P(arg1) != IS_LONG) {
                WRONG_PARAM_COUNT;
        }
 
        convert_to_long( arg1);
-       state = (PCON_STATE) arg1->value.lval;
+       state = (PCON_STATE) Z_LVAL_P(arg1);
 
        for (i=0;i<state->nstatements;i++) {
                stmt = (SQLS) state->statements[ i].statement;
index dec12594a4461a826c34d37fec978f4bdc3ac2c6..40893d29b3e0a602be0cb29259ffc27dbd0a566b 100644 (file)
@@ -216,41 +216,41 @@ PHP_FUNCTION(pfpro_process_raw)
        switch (ZEND_NUM_ARGS()) {
                case 8:
                        convert_to_string_ex(args[7]);
-                       proxyPassword = (*args[7])->value.str.val;
+                       proxyPassword = Z_STRVAL_PP(args[7]);
                        /* fall through */
 
                case 7:
                        convert_to_string_ex(args[6]);
-                       proxyLogon = (*args[6])->value.str.val;
+                       proxyLogon = Z_STRVAL_PP(args[6]);
                        /* fall through */
 
                case 6:
                        convert_to_long_ex(args[5]);
-                       proxyPort = (*args[5])->value.lval;
+                       proxyPort = Z_LVAL_PP(args[5]);
                        /* fall through */
 
                case 5:
                        convert_to_string_ex(args[4]);
-                       proxyAddress = (*args[4])->value.str.val;
+                       proxyAddress = Z_STRVAL_PP(args[4]);
                        /* fall through */
 
                case 4:
                        convert_to_long_ex(args[3]);
-                       timeout = (*args[3])->value.lval;
+                       timeout = Z_LVAL_PP(args[3]);
                        /* fall through */
 
                case 3:
                        convert_to_long_ex(args[2]);
-                       port = (*args[2])->value.lval;
+                       port = Z_LVAL_PP(args[2]);
                        /* fall through */
 
                case 2:
                        convert_to_string_ex(args[1]);
-                       address = (*args[1])->value.str.val;
+                       address = Z_STRVAL_PP(args[1]);
        }
 
        convert_to_string_ex(args[0]);
-       parmlist = (*args[0])->value.str.val;
+       parmlist = Z_STRVAL_PP(args[0]);
 
        efree(args);
 
@@ -341,7 +341,7 @@ PHP_FUNCTION(pfpro_process)
                RETURN_FALSE;
        }
 
-       if ((*args[0])->type != IS_ARRAY) {
+       if (Z_TYPE_PP(args[0]) != IS_ARRAY) {
                php_error(E_ERROR, "First parameter to pfpro_process() must be an array");
                efree(args);
                RETURN_FALSE;
@@ -350,37 +350,37 @@ PHP_FUNCTION(pfpro_process)
        switch (ZEND_NUM_ARGS()) {
                case 8:
                        convert_to_string_ex(args[7]);
-                       proxyPassword = (*args[7])->value.str.val;
+                       proxyPassword = Z_STRVAL_PP(args[7]);
                        /* fall through */
 
                case 7:
                        convert_to_string_ex(args[6]);
-                       proxyLogon = (*args[6])->value.str.val;
+                       proxyLogon = Z_STRVAL_PP(args[6]);
                        /* fall through */
 
                case 6:
                        convert_to_long_ex(args[5]);
-                       proxyPort = (*args[5])->value.lval;
+                       proxyPort = Z_LVAL_PP(args[5]);
                        /* fall through */
 
                case 5:
                        convert_to_string_ex(args[4]);
-                       proxyAddress = (*args[4])->value.str.val;
+                       proxyAddress = Z_STRVAL_PP(args[4]);
                        /* fall through */
 
                case 4:
                        convert_to_long_ex(args[3]);
-                       timeout = (*args[3])->value.lval;
+                       timeout = Z_LVAL_PP(args[3]);
                        /* fall through */
 
                case 3:
                        convert_to_long_ex(args[2]);
-                       port = (*args[2])->value.lval;
+                       port = Z_LVAL_PP(args[2]);
                        /* fall through */
 
                case 2:
                        convert_to_string_ex(args[1]);
-                       address = (*args[1])->value.str.val;
+                       address = Z_STRVAL_PP(args[1]);
        }
 
        /* Concatenate the passed array as specified by Verisign.
index 0780c4b7b7d7cbee53a5938c184b51cee211674f..af8c7fd3fb0a8800b0277372b781b3e570e166ab 100644 (file)
@@ -438,7 +438,7 @@ void java_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_refe
       return;
     }
 
-    className=(*jenv)->NewStringUTF(jenv, arguments[0]->value.str.val);
+    className=(*jenv)->NewStringUTF(jenv, Z_STRVAL_P(arguments[0]));
     (*jenv)->CallVoidMethod(jenv, JG(php_reflect), co,
       className, _java_makeArray(arg_count-1, arguments+1 TSRMLS_CC), result);
 
index 21d6c05e30ce45ef6b4a40404d15f4c29edd41d8..421e80b29a6616d39f69769afe844966e005520d 100644 (file)
@@ -815,13 +815,13 @@ PHP_FUNCTION(xmlrpc_server_destroy) {
       WRONG_PARAM_COUNT; /* prints/logs a warning and returns */
    }
 
-   if(arg1->type == IS_RESOURCE) {
+   if(Z_TYPE_P(arg1) == IS_RESOURCE) {
       int type;
 
-      xmlrpc_server_data *server = zend_list_find(arg1->value.lval, &type);
+      xmlrpc_server_data *server = zend_list_find(Z_LVAL_P(arg1), &type);
 
       if(server && type == XMLRPCG(le_xmlrpc_server)) {
-         bSuccess = zend_list_delete(arg1->value.lval);
+         bSuccess = zend_list_delete(Z_LVAL_P(arg1));
 
          /* called by hashtable destructor
           * destroy_server_data(server);
@@ -1163,7 +1163,7 @@ PHP_FUNCTION(xmlrpc_parse_method_descriptions)
 
    if(return_value_used) {
       STRUCT_XMLRPC_ERROR err = {0};
-      XMLRPC_VALUE xVal = XMLRPC_IntrospectionCreateDescription(arg1->value.str.val, &err);
+      XMLRPC_VALUE xVal = XMLRPC_IntrospectionCreateDescription(Z_STRVAL_P(arg1), &err);
       if(xVal) {
          retval = XMLRPC_to_PHP(xVal);
 
index 197d1e2c5af33383d2d19ecae00712ceaa2b7681..10abaa000447e9e52c24438b9192aba2b7623587 100644 (file)
@@ -96,14 +96,14 @@ zend_bool OrbitEnum_Constructor(OrbitEnum ** ppEnum, int parameterCount,
        }
 
        /* validate parameter types */
-       if (ppParameters[0]->type != IS_STRING)
+       if (ppPZ_TYPE_P(arameters[0]) != IS_STRING)
                goto error;
 
        /* find type information */
-       p_enum->mpEnumType = TypeManager_FindEnum(ppParameters[0]->value.str.val);
+       p_enum->mpEnumType = TypeManager_FindEnum(ppPZ_STRVAL_P(arameters[0]));
        if (p_enum->mpEnumType == NULL)
        {
-               zend_error(E_WARNING, "(Satellite) unknown enum '%s'", ppParameters[0]->value.str.val);
+               zend_error(E_WARNING, "(Satellite) unknown enum '%s'", ppPZ_STRVAL_P(arameters[0]));
                goto error;
        }
 
index 45aac9ecaf9c7b51dc651d7e44db3aa451d4aac2..ac12a60b5cc1528922b70225c04eb4d141b9a343 100644 (file)
@@ -277,7 +277,7 @@ zend_bool  OrbitObject_Constructor(OrbitObject  ** ppObject,
        }
 
        /* validate parameter types */
-       if (ppParameters[0]->type != IS_STRING)
+       if (ppPZ_TYPE_P(arameters[0]) != IS_STRING)
        {
                zend_error(E_WARNING, "(Satellite) IOR is not a string");
                goto error;
@@ -286,7 +286,7 @@ zend_bool  OrbitObject_Constructor(OrbitObject  ** ppObject,
        /* initialize data object */
        if ( !OrbitObject_InitializeData(
                        p_object,
-                       ppParameters[0]->value.str.val) )
+                       ppPZ_STRVAL_P(arameters[0])) )
        {
                goto error;
        }
index e7ffbf7daa4deeadb5ae69e52e6c807b56eb08c5..6c85af2d0a856850ac3d50141483113637f2da69 100644 (file)
@@ -240,11 +240,11 @@ zend_bool  OrbitStruct_Constructor(OrbitStruct  ** ppStruct,
        }
 
        /* validate parameter types */
-       if (ppParameters[0]->type != IS_STRING)
+       if (ppPZ_TYPE_P(arameters[0]) != IS_STRING)
                goto error;
        
        /* initialize struct */
-       if (!OrbitStruct_Initialize(ppParameters[0]->value.str.val, p_struct))
+       if (!OrbitStruct_Initialize(ppPZ_STRVAL_P(arameters[0]), p_struct))
                goto error;
        
        *ppStruct = p_struct;
index 7154f5253c88325a0fdbafeaec38e422c8b75556..9afa835dcac3fb671b13b1172515a1b6e7c0d4a5 100644 (file)
@@ -187,29 +187,29 @@ void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
        
                if(myargc > 5) {
                        convert_to_long_ex(a6);
-                       timeout = (*a6)->value.lval;
+                       timeout = Z_LVAL_PP(a6);
                }
 
                if(myargc > 6) {
                        convert_to_long_ex(a7);
-                       retries = (*a7)->value.lval;
+                       retries = Z_LVAL_PP(a7);
                }
 
-               type = (*a4)->value.str.val[0];
-               value = (*a5)->value.str.val;
+               type = Z_STRVAL_PP(a4)[0];
+               value = Z_STRVAL_PP(a5);
        } else {
                if(myargc > 3) {
                        convert_to_long_ex(a4);
-                       timeout = (*a4)->value.lval;
+                       timeout = Z_LVAL_PP(a4);
                }
 
                if(myargc > 4) {
                        convert_to_long_ex(a5);
-                       retries = (*a5)->value.lval;
+                       retries = Z_LVAL_PP(a5);
                }
        }
 
-       objid = (*a3)->value.str.val;
+       objid = Z_STRVAL_PP(a3);
        
        if (st >= 2) { /* walk */
                rootlen = MAX_NAME_LEN;
@@ -229,7 +229,7 @@ void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
        
        memset(&session, 0, sizeof(struct snmp_session));
 
-       strcpy (hostname, (*a1)->value.str.val);
+       strcpy (hostname, Z_STRVAL_PP(a1));
        if ((pptr = strchr (hostname, ':'))) {
                remote_port = strtol (pptr + 1, NULL, 0);
                *pptr = 0;
@@ -245,11 +245,11 @@ void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
        * memory it did not allocate
        */
 #ifdef UCD_SNMP_HACK
-       session.community = (u_char *)strdup((*a2)->value.str.val); /* memory freed by SNMP library, strdup NOT estrdup */
+       session.community = (u_char *)strdup(Z_STRVAL_PP(a2)); /* memory freed by SNMP library, strdup NOT estrdup */
 #else
-       session.community = (u_char *)(*a2)->value.str.val;
+       session.community = (u_char *)Z_STRVAL_PP(a2);
 #endif
-       session.community_len = (*a2)->value.str.len;
+       session.community_len = Z_STRLEN_PP(a2);
        session.retries = retries;
        session.timeout = timeout;
        
@@ -360,7 +360,7 @@ retry:
                                }
                        }
                } else if (status == STAT_TIMEOUT) {
-                       php_error(E_WARNING,"No Response from %s\n", (*a1)->value.str.val);
+                       php_error(E_WARNING,"No Response from %s\n", Z_STRVAL_PP(a1));
                        RETURN_FALSE;
                } else {    /* status == STAT_ERROR */
                        php_error(E_WARNING,"An error occurred, Quitting...\n");
index 2ac0aba2f4b13aed8b55d62a3dd4b403406d5f11..0a9bcb6f995779868ed5c14c70a2b36f615e297f 100644 (file)
@@ -74,10 +74,10 @@ void _php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
        convert_to_string(a2);
        convert_to_string(a3);
 
-       agent=a1->value.str.val;
-       community=a2->value.str.val;
+       agent=Z_STRVAL_P(a1);
+       community=Z_STRVAL_P(a2);
        operation=st;
-       SnmpMgrStrToOid(a3->value.str.val, &oid);
+       SnmpMgrStrToOid(Z_STRVAL_P(a3), &oid);
 
 /* 
    I've limited this to only one oid, but we can create a
index 8510d99c03e7a2c08b55097080e995be993d5cf6..1895dece6aa4e88d306b5823bacf87d64b5b1386 100644 (file)
@@ -1976,8 +1976,8 @@ PHP_FUNCTION(socket_create_pair)
 
        php_sock[0]->bsd_socket = fds_array[0];
        php_sock[1]->bsd_socket = fds_array[1];
-       php_sock[0]->type = Z_LVAL_PP(arg1);
-       php_sock[1]->type = Z_LVAL_PP(arg1);    
+       Z_TYPE_P(php_sock[0]) = Z_LVAL_PP(arg1);
+       Z_TYPE_P(php_sock[1]) = Z_LVAL_PP(arg1);        
 
        ZEND_REGISTER_RESOURCE(retval[0], php_sock[0], le_socket);
        ZEND_REGISTER_RESOURCE(retval[1], php_sock[1], le_socket);
index 71eb7740d9a603c5119f28f1a681b4aedbf22c44..d12039269c7f738b5895ddf19b3f060450358906 100644 (file)
@@ -119,16 +119,16 @@ void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm)
        */
        switch(arg_count) {
        case 7:
-               ta->tm_isdst = is_dst = (*arguments[6])->value.lval;
+               ta->tm_isdst = is_dst = Z_LVAL_PP(arguments[6]);
                /* fall-through */
        case 6:
                /* special case: 
                   a zero in year, month and day is considered illegal
                   as it would be interpreted as 30.11.1999 otherwise
                */
-               if (  (  (*arguments[5])->value.lval==0)
-                         &&((*arguments[4])->value.lval==0)
-                         &&((*arguments[3])->value.lval==0)
+               if (  (  Z_LVAL_PP(arguments[5])==0)
+                         &&(Z_LVAL_PP(arguments[4])==0)
+                         &&(Z_LVAL_PP(arguments[3])==0)
                          ) {
                        RETURN_LONG(-1);
                }
@@ -143,26 +143,26 @@ void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm)
                ** But it cannot represent ancestral dates prior to year 1001.
                ** Additionally, input parameters of 0..70 are mapped to 100..170
                */
-               if ((*arguments[5])->value.lval < 70)
-                       ta->tm_year = (*arguments[5])->value.lval + 100;
+               if (Z_LVAL_PP(arguments[5]) < 70)
+                       ta->tm_year = Z_LVAL_PP(arguments[5]) + 100;
                else
-                       ta->tm_year = (*arguments[5])->value.lval
-                         - (((*arguments[5])->value.lval > 1000) ? 1900 : 0);
+                       ta->tm_year = Z_LVAL_PP(arguments[5])
+                         - ((Z_LVAL_PP(arguments[5]) > 1000) ? 1900 : 0);
                /* fall-through */
        case 5:
-               ta->tm_mday = (*arguments[4])->value.lval;
+               ta->tm_mday = Z_LVAL_PP(arguments[4]);
                /* fall-through */
        case 4:
-               ta->tm_mon = (*arguments[3])->value.lval - 1;
+               ta->tm_mon = Z_LVAL_PP(arguments[3]) - 1;
                /* fall-through */
        case 3:
-               ta->tm_sec = (*arguments[2])->value.lval;
+               ta->tm_sec = Z_LVAL_PP(arguments[2]);
                /* fall-through */
        case 2:
-               ta->tm_min = (*arguments[1])->value.lval;
+               ta->tm_min = Z_LVAL_PP(arguments[1]);
                /* fall-through */
        case 1:
-               ta->tm_hour = (*arguments[0])->value.lval;
+               ta->tm_hour = Z_LVAL_PP(arguments[0]);
                /* fall-through */
        case 0:
                break;
index d10de4d6f833c5af03f41d6808b6ade6e1042c15..2dc49c06405416c6503ab08c21835265f8e7213e 100644 (file)
@@ -444,12 +444,12 @@ php_formatted_print(int ht, int *len, int use_array TSRMLS_DC)
                }
        }
        convert_to_string_ex(args[0]);
-       format = (*args[0])->value.str.val;
+       format = Z_STRVAL_PP(args[0]);
        result = emalloc(size);
 
        currarg = 1;
 
-       while (inpos<(*args[0])->value.str.len) {
+       while (inpos<Z_STRLEN_PP(args[0])) {
                int expprec = 0;
 
                PRINTF_DEBUG(("sprintf: format[%d]='%c'\n", inpos, format[inpos]));
index c314531171ab44e56bba19966ca2d29742d219d4..8543ccf3602b7450d26b24252a8b5ade3f1a15e8 100644 (file)
@@ -89,7 +89,7 @@ static void php_print_gpcse_array(char *name, uint name_length TSRMLS_DC)
                                tmp2 = **tmp;
                                zval_copy_ctor(&tmp2);
                                convert_to_string(&tmp2);
-                               zend_html_puts(tmp2.value.str.val, tmp2.value.str.len);
+                               zend_html_puts(Z_STRVAL(tmp2), Z_STRLEN(tmp2));
                                zval_dtor(&tmp2);
                        } else {
                                zend_html_puts(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp));
index 7ce5f79764579233d93fa234b0b867ea31138dd1..129044128c7b881fc7f5f78e75da9a52e655d50a 100644 (file)
@@ -101,8 +101,8 @@ PHP_FUNCTION(levenshtein)
                convert_to_string_ex(str1);
                convert_to_string_ex(str2);
 
-               distance = reference_levdist((*str1)->value.str.val, (*str1)->value.str.len
-                                                                                                                                (*str2)->value.str.val, (*str2)->value.str.len,
+               distance = reference_levdist(Z_STRVAL_PP(str1), Z_STRLEN_PP(str1)
+                                                                                                                                Z_STRVAL_PP(str2), Z_STRLEN_PP(str2),
                                                                                                                                 1, 1, 1);
 
                break;
@@ -117,8 +117,8 @@ PHP_FUNCTION(levenshtein)
                convert_to_long_ex(cost_rep);
                convert_to_long_ex(cost_del);
                
-               distance = reference_levdist((*str1)->value.str.val, (*str1)->value.str.len
-                                                                                                                                (*str2)->value.str.val, (*str2)->value.str.len,
+               distance = reference_levdist(Z_STRVAL_PP(str1), Z_STRLEN_PP(str1)
+                                                                                                                                Z_STRVAL_PP(str2), Z_STRLEN_PP(str2),
                                                                                                                                 Z_LVAL_PP(cost_ins),
                                                                                                                                 Z_LVAL_PP(cost_rep),
                                                                                                                                 Z_LVAL_PP(cost_del)
@@ -134,8 +134,8 @@ PHP_FUNCTION(levenshtein)
                convert_to_string_ex(str2);
                convert_to_string_ex(callback_name);
 
-               distance = custom_levdist((*str1)->value.str.val
-                                                                                                                               , (*str2)->value.str.val
+               distance = custom_levdist(Z_STRVAL_PP(str1)
+                                                                                                                               , Z_STRVAL_PP(str2)
                                                                                                                                , Z_STRVAL_PP(callback_name)
                                                                                                                                );
                break;
index d045fa469074b17d36a8e4f1d08d5da838dfa619..b9c6229427b63d28aaab2a5f9c163d06f769b7ed 100644 (file)
@@ -88,8 +88,8 @@ PHP_FUNCTION(mail)
        }
        /* To: */
        convert_to_string_ex(argv[0]);
-       if ((*argv[0])->value.str.val) {
-               to = (*argv[0])->value.str.val;
+       if (Z_STRVAL_PP(argv[0])) {
+               to = Z_STRVAL_PP(argv[0]);
        } else {
                php_error(E_WARNING, "No to field in mail command");
                RETURN_FALSE;
@@ -97,7 +97,7 @@ PHP_FUNCTION(mail)
 
        /* Subject: */
        convert_to_string_ex(argv[1]);
-       if ((*argv[1])->value.str.val) {
+       if (Z_STRVAL_PP(argv[1])) {
                subject = Z_STRVAL_PP(argv[1]);
        } else {
                php_error(E_WARNING, "No subject field in mail command");
@@ -106,7 +106,7 @@ PHP_FUNCTION(mail)
 
        /* message body */
        convert_to_string_ex(argv[2]);
-       if ((*argv[2])->value.str.val) {
+       if (Z_STRVAL_PP(argv[2])) {
                message = Z_STRVAL_PP(argv[2]);
        } else {
                /* this is not really an error, so it is allowed. */
index 97ad6e6efa5ee26aeb6ce96f5cb7921f58e88d7c..e2f2ffc8a079903d132de6de1af1486698a39287 100644 (file)
@@ -69,13 +69,13 @@ PHP_FUNCTION(quoted_printable_decode)
     }
     convert_to_string_ex(arg1);
     
-       if((*arg1)->value.str.len == 0) {
+       if(Z_STRLEN_PP(arg1) == 0) {
                /* shortcut */
                RETURN_EMPTY_STRING();
        }
 
-    str_in = (*arg1)->value.str.val;
-       str_out = emalloc((*arg1)->value.str.len+1);
+    str_in = Z_STRVAL_PP(arg1);
+       str_out = emalloc(Z_STRLEN_PP(arg1)+1);
     while ( str_in[i] )
     {
         switch (str_in[i])
index 7b81d3245e87857aaa7b65aec9a0bb089897f63f..f8cfa0536f5fd4d9acc87e171cfc8e402164e2b5 100644 (file)
@@ -3501,8 +3501,8 @@ static void php_strnatcmp(INTERNAL_FUNCTION_PARAMETERS, int fold_case)
        convert_to_string_ex(s1);
        convert_to_string_ex(s2);
 
-       RETURN_LONG(strnatcmp_ex((*s1)->value.str.val, (*s1)->value.str.len,
-                                                        (*s2)->value.str.val, (*s2)->value.str.len,
+       RETURN_LONG(strnatcmp_ex(Z_STRVAL_PP(s1), Z_STRLEN_PP(s1),
+                                                        Z_STRVAL_PP(s2), Z_STRLEN_PP(s2),
                                                         fold_case));
 }
 /* }}} */
index abc3b2ccb765154160661b29fc9f6fcd24bb628e..2f470b21e845a26275161f969d1121a367292065 100644 (file)
@@ -800,7 +800,7 @@ void _xml_characterDataHandler(void *userData, const XML_Char *s, int len)
                                        zval **myval;
                                        
                                        /* check if the current tag already has a value - if yes append to that! */
-                                       if (zend_hash_find((*parser->ctag)->value.ht,"value",sizeof("value"),(void **) &myval) == SUCCESS) {
+                                       if (zend_hash_find(Z_ARRVAL_PP(parser->ctag),"value",sizeof("value"),(void **) &myval) == SUCCESS) {
                                                int newlen = Z_STRLEN_PP(myval) + decoded_len;
                                                Z_STRVAL_PP(myval) = erealloc(Z_STRVAL_PP(myval),newlen+1);
                                                strcpy(Z_STRVAL_PP(myval) + Z_STRLEN_PP(myval),decoded_value);
@@ -1014,18 +1014,18 @@ PHP_FUNCTION(xml_parser_create)
                /* The supported encoding types are hardcoded here because
                 * we are limited to the encodings supported by expat/xmltok.
                 */
-               if (strncasecmp((*encodingArg)->value.str.val, "ISO-8859-1",
-                                               (*encodingArg)->value.str.len) == 0) {
+               if (strncasecmp(Z_STRVAL_PP(encodingArg), "ISO-8859-1",
+                                               Z_STRLEN_PP(encodingArg)) == 0) {
                        encoding = "ISO-8859-1";
-               } else if (strncasecmp((*encodingArg)->value.str.val, "UTF-8",
-                                               (*encodingArg)->value.str.len) == 0) {
+               } else if (strncasecmp(Z_STRVAL_PP(encodingArg), "UTF-8",
+                                               Z_STRLEN_PP(encodingArg)) == 0) {
                        encoding = "UTF-8";
-               } else if (strncasecmp((*encodingArg)->value.str.val, "US-ASCII",
-                                               (*encodingArg)->value.str.len) == 0) {
+               } else if (strncasecmp(Z_STRVAL_PP(encodingArg), "US-ASCII",
+                                               Z_STRLEN_PP(encodingArg)) == 0) {
                        encoding = "US-ASCII";
                } else { /* UTF-16 not supported */
                        php_error(E_WARNING, "%s: unsupported source encoding \"%s\"",
-                                          thisfunc, (*encodingArg)->value.str.val);
+                                          thisfunc, Z_STRVAL_PP(encodingArg));
                        RETURN_FALSE;
                }
        } else {
@@ -1065,18 +1065,18 @@ PHP_FUNCTION(xml_parser_create_ns)
                /* The supported encoding types are hardcoded here because
                 * we are limited to the encodings supported by expat/xmltok.
                 */
-               if (strncasecmp((*encodingArg)->value.str.val, "ISO-8859-1",
-                                               (*encodingArg)->value.str.len) == 0) {
+               if (strncasecmp(Z_STRVAL_PP(encodingArg), "ISO-8859-1",
+                                               Z_STRLEN_PP(encodingArg)) == 0) {
                        encoding = "ISO-8859-1";
-               } else if (strncasecmp((*encodingArg)->value.str.val, "UTF-8",
-                                               (*encodingArg)->value.str.len) == 0) {
+               } else if (strncasecmp(Z_STRVAL_PP(encodingArg), "UTF-8",
+                                               Z_STRLEN_PP(encodingArg)) == 0) {
                        encoding = "UTF-8";
-               } else if (strncasecmp((*encodingArg)->value.str.val, "US-ASCII",
-                                               (*encodingArg)->value.str.len) == 0) {
+               } else if (strncasecmp(Z_STRVAL_PP(encodingArg), "US-ASCII",
+                                               Z_STRLEN_PP(encodingArg)) == 0) {
                        encoding = "US-ASCII";
                } else { /* UTF-16 not supported */
                        php_error(E_WARNING, "%s: unsupported source encoding \"%s\"",
-                                          thisfunc, (*encodingArg)->value.str.val);
+                                          thisfunc, Z_STRVAL_PP(encodingArg));
                        RETURN_FALSE;
                }
        } else {
@@ -1085,7 +1085,7 @@ PHP_FUNCTION(xml_parser_create_ns)
 
        if (argc == 2){
                convert_to_string_ex(sepArg);
-               sep = (*sepArg)->value.str.val;
+               sep = Z_STRVAL_PP(sepArg);
        } else {
                sep = ":";
        }
index 21d6c05e30ce45ef6b4a40404d15f4c29edd41d8..421e80b29a6616d39f69769afe844966e005520d 100644 (file)
@@ -815,13 +815,13 @@ PHP_FUNCTION(xmlrpc_server_destroy) {
       WRONG_PARAM_COUNT; /* prints/logs a warning and returns */
    }
 
-   if(arg1->type == IS_RESOURCE) {
+   if(Z_TYPE_P(arg1) == IS_RESOURCE) {
       int type;
 
-      xmlrpc_server_data *server = zend_list_find(arg1->value.lval, &type);
+      xmlrpc_server_data *server = zend_list_find(Z_LVAL_P(arg1), &type);
 
       if(server && type == XMLRPCG(le_xmlrpc_server)) {
-         bSuccess = zend_list_delete(arg1->value.lval);
+         bSuccess = zend_list_delete(Z_LVAL_P(arg1));
 
          /* called by hashtable destructor
           * destroy_server_data(server);
@@ -1163,7 +1163,7 @@ PHP_FUNCTION(xmlrpc_parse_method_descriptions)
 
    if(return_value_used) {
       STRUCT_XMLRPC_ERROR err = {0};
-      XMLRPC_VALUE xVal = XMLRPC_IntrospectionCreateDescription(arg1->value.str.val, &err);
+      XMLRPC_VALUE xVal = XMLRPC_IntrospectionCreateDescription(Z_STRVAL_P(arg1), &err);
       if(xVal) {
          retval = XMLRPC_to_PHP(xVal);
 
index 91e4d77c67261aebd46070228960b906ff870754..ba6fb8d420e5443ce1ba4dd84083c95ef7a05c82 100644 (file)
@@ -267,7 +267,7 @@ PHP_FUNCTION(gzfile)
                        WRONG_PARAM_COUNT;
                }
                convert_to_long_ex(arg2);
-               use_include_path = (*arg2)->value.lval?USE_PATH:0;
+               use_include_path = Z_LVAL_PP(arg2)?USE_PATH:0;
                break;
        default:
                WRONG_PARAM_COUNT;
@@ -321,23 +321,23 @@ PHP_FUNCTION(gzopen)
                        WRONG_PARAM_COUNT;
                }
                convert_to_long_ex(arg3);
-               use_include_path = (*arg3)->value.lval?USE_PATH:0;
+               use_include_path = Z_LVAL_PP(arg3)?USE_PATH:0;
                break;
        default:
                WRONG_PARAM_COUNT;
        }
        convert_to_string_ex(arg1);
        convert_to_string_ex(arg2);
-       p = estrndup((*arg2)->value.str.val,(*arg2)->value.str.len);
+       p = estrndup(Z_STRVAL_PP(arg2),Z_STRLEN_PP(arg2));
 
        /*
         * We need a better way of returning error messages from
         * php_gzopen_wrapper().
         */
-       zp = php_gzopen_wrapper((*arg1)->value.str.val, p, use_include_path|ENFORCE_SAFE_MODE TSRMLS_CC);
+       zp = php_gzopen_wrapper(Z_STRVAL_PP(arg1), p, use_include_path|ENFORCE_SAFE_MODE TSRMLS_CC);
        if (!zp) {
                php_error(E_WARNING,"gzopen(\"%s\",\"%s\") - %s",
-                                       (*arg1)->value.str.val, p, strerror(errno));
+                                       Z_STRVAL_PP(arg1), p, strerror(errno));
                efree(p);
                RETURN_FALSE;
        }
@@ -358,7 +358,7 @@ PHP_FUNCTION(gzclose)
                WRONG_PARAM_COUNT;
        }
        ZEND_FETCH_RESOURCE(zp, gzFile *, arg1, -1, "Zlib file", le_zp);
-       zend_list_delete((*arg1)->value.lval);
+       zend_list_delete(Z_LVAL_PP(arg1));
        RETURN_TRUE;
 }
 /* }}} */
@@ -396,7 +396,7 @@ PHP_FUNCTION(gzgets)
                WRONG_PARAM_COUNT;
        }
        convert_to_long_ex(arg2);
-       len = (*arg2)->value.lval;
+       len = Z_LVAL_PP(arg2);
 
        ZEND_FETCH_RESOURCE(zp, gzFile *, arg1, -1, "Zlib file", le_zp);
 
@@ -517,7 +517,7 @@ PHP_FUNCTION(gzwrite)
                                RETURN_FALSE;
                        }
                        convert_to_string_ex(arg2);
-                       num_bytes = (*arg2)->value.str.len;
+                       num_bytes = Z_STRLEN_PP(arg2);
                        break;
                case 3:
                        if (zend_get_parameters_ex(3, &arg1, &arg2, &arg3)==FAILURE) {
@@ -525,7 +525,7 @@ PHP_FUNCTION(gzwrite)
                        }
                        convert_to_string_ex(arg2);
                        convert_to_long_ex(arg3);
-                       num_bytes = MIN((*arg3)->value.lval, (*arg2)->value.str.len);
+                       num_bytes = MIN(Z_LVAL_PP(arg3), Z_STRLEN_PP(arg2));
                        break;
                default:
                        WRONG_PARAM_COUNT;
@@ -539,7 +539,7 @@ PHP_FUNCTION(gzwrite)
                php_stripslashes(Z_STRVAL_PP(arg2), &num_bytes TSRMLS_CC);
        }
 
-       ret = gzwrite(zp, (*arg2)->value.str.val,num_bytes);
+       ret = gzwrite(zp, Z_STRVAL_PP(arg2),num_bytes);
        RETURN_LONG(ret);
 }      
 /* }}} */
@@ -600,7 +600,7 @@ PHP_FUNCTION(gzseek)
 
        ZEND_FETCH_RESOURCE(zp, gzFile *, arg1, -1, "Zlib file", le_zp);
 
-       ret = gzseek(zp, (*arg2)->value.lval, SEEK_SET);
+       ret = gzseek(zp, Z_LVAL_PP(arg2), SEEK_SET);
        RETURN_LONG(ret);
 }
 /* }}} */
@@ -631,7 +631,7 @@ PHP_FUNCTION(readgzfile)
                        WRONG_PARAM_COUNT;
                }
                convert_to_long_ex(arg2);
-               use_include_path = (*arg2)->value.lval?USE_PATH:0;
+               use_include_path = Z_LVAL_PP(arg2)?USE_PATH:0;
                break;
        default:
                WRONG_PARAM_COUNT;
@@ -642,9 +642,9 @@ PHP_FUNCTION(readgzfile)
         * We need a better way of returning error messages from
         * php_gzopen_wrapper().
         */
-       zp = php_gzopen_wrapper((*arg1)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE TSRMLS_CC);
+       zp = php_gzopen_wrapper(Z_STRVAL_PP(arg1),"r", use_include_path|ENFORCE_SAFE_MODE TSRMLS_CC);
        if (!zp){
-               php_error(E_WARNING,"ReadGzFile(\"%s\") - %s",(*arg1)->value.str.val,strerror(errno));
+               php_error(E_WARNING,"ReadGzFile(\"%s\") - %s",Z_STRVAL_PP(arg1),strerror(errno));
                RETURN_FALSE;
        }
        size= 0;
@@ -681,7 +681,7 @@ PHP_FUNCTION(gzpassthru)
                size += b ;
        }
 /*  gzclose(zp); */
-       zend_list_delete((*arg1)->value.lval);
+       zend_list_delete(Z_LVAL_PP(arg1));
        RETURN_LONG(size);
 }
 /* }}} */
@@ -698,7 +698,7 @@ PHP_FUNCTION(gzread)
                WRONG_PARAM_COUNT;
        }
        convert_to_long_ex(arg2);
-       len = (*arg2)->value.lval;
+       len = Z_LVAL_PP(arg2);
 
        ZEND_FETCH_RESOURCE(zp, gzFile *, arg1, -1, "Zlib file", le_zp);