Refcursor as an OUT variable and test harness is failing

Folks,
create or replace PROCEDURE GetA ( p_list IN OUT sys_refcursor )is
lv_func_name function_static.fntn_name%type:='GetCountrylist';
st varchar2(1000);
begin
st := 'begin :1:='||lv_func_name||'; end;' ;
dbms_output.put_line(st);
execute immediate st using out p_list;
end GetA;
create or replace function Getcountrylist return sys_refcursor is
p_list sys_refcursor;
begin
open p_list for
select ctry_code Code, ctry_name Description
from country
where active_flag = 1;
return p_list;
end GetCountrylist;
the following test harness is giving me an invalid cursor.
declare
rc1 sys_refcursor;
v_code varchar2(10);
v_desc varchar2(10);
begin
GetA (rc1);
loop
fetch rc1 into v_code,v_desc;
DBMS_OUTPUT.PUT_LINE(v_code || ' ** ' || v_desc);
END LOOP;
CLOSE rc1;
end;
But if I test it in sqlplus like this, it works fine.
Var r refcursor
Exec geta(:r)
Print r
Any help.
Thanks
Ram

STEP - 2
SQL>
SQL>
SQL> insert into country values('&ct_cd','&ct_nm',&flg);
Enter value for ct_cd: 007
Enter value for ct_nm: Russia
Enter value for flg: 1
old   1: insert into country values('&ct_cd','&ct_nm',&flg)
new   1: insert into country values('007','Russia',1)
1 row created.
SQL> /
Enter value for ct_cd: 001
Enter value for ct_nm: USA
Enter value for flg: 0
old   1: insert into country values('&ct_cd','&ct_nm',&flg)
new   1: insert into country values('001','USA',0)
1 row created.
SQL> /
Enter value for ct_cd: 091
Enter value for ct_nm: INDIA
Enter value for flg: 1
old   1: insert into country values('&ct_cd','&ct_nm',&flg)
new   1: insert into country values('091','INDIA',1)
1 row created.
SQL> /
Enter value for ct_cd: 056
Enter value for ct_nm: UK
Enter value for flg: 1
old   1: insert into country values('&ct_cd','&ct_nm',&flg)
new   1: insert into country values('056','UK',1)
1 row created.
SQL> commit;
Commit complete.
SQL> select * from country;
CTRY_CODE  CTRY_NAME                      ACTIVE_FLAG
007        Russia                                   1
001        USA                                      0
091        INDIA                                    1
056        UK                                       1
SQL> ed
Wrote file afiedt.buf
  1  create or replace PROCEDURE GetA ( p_list IN OUT sys_refcursor )
  2  is
  3    --  lv_func_name function_static.fntn_name%type:='GetCountrylist';
  4    lv_func_name varchar2(30):='GetCountrylist';
  5    st varchar2(1000);
  6  begin
  7   st := 'begin :1:='||lv_func_name||'; end;' ;
  8   dbms_output.put_line(st);
  9   execute immediate st using out p_list;
10* end GetA;
11  /
Procedure created.
SQL>
SQL>
SQL> create or replace function Getcountrylist
  2  return sys_refcursor
  3  is
  4    p_list sys_refcursor;
  5  begin
  6    open p_list for
  7    select ctry_code Code, ctry_name Description
  8    from country
  9    where active_flag = 1;
10 
11    return p_list;
12 
13  end GetCountrylist;
14  /
Function created.
SQL>
SQL> declare
  2   rc1 sys_refcursor;
  3 
  4   type a is record ( code varchar2(10), description varchar2(30) );
  5   b a;
  6  begin
  7   GetA(rc1);
  8   loop
  9    fetch rc1 into b;
10    exit when rc1%notfound;
11    DBMS_OUTPUT.PUT_LINE(b.code || ' ** ' || b.description);
12   END LOOP;
13   CLOSE rc1;
14  end;
15  /
begin :1:=GetCountrylist; end;
007 ** Russia
091 ** INDIA
056 ** UK
PL/SQL procedure successfully completed.Regards.
Satyaki De

Similar Messages

  • Returning in out variable in proc

    I am performing an insert using bulk collect.
    In the below procedure v_week_no(i) is an IN OUT parameter, so i have to pass v_week_no(i) as input but i do not know how can i get the same v_week_no(i) as OUT parameter.
    I have to get the same parameter as OUT and use that value in the next insert query.
    How can i do this??
    PKG_WEIGHT_TRACKER.P_SAVE_WEIGH_IN_RECORD
    ( v_member_id_1(i),
    v_week_no(i),
    v_mc_date(i),
    v_l_no(i),
    v_height_1(i),
    v_today_weight_kg(i),
    v_flag,
    v_pn_no(i),
    v_wt_loss_plan,
    v_meeting_user_map_id_seq(i),
    v_site_id
    ----- Get the v_week_no(i) as out value from proc and use in the below insert
              INSERT INTO member_milestone
              (     member_milestone_id ,
                   user_id ,
                   week_no ,
                   milestone_id ,
                   reached_date ,
                   site_id ,
                   created_date ,
                   created_by ,
                   last_upd_date ,
                   last_upd_by
              SELECT member_milestone_id_seq.nextval,
                   v_member_id_1(i),
                   v_week_no(i),
                   v_pa_no(i),
                   v_mc_date(i),
                   v_site_id,
                   v_mc_date(i) ,
                   v_created_by ,
                   v_sysDATE ,
                   V_CREATED_BY
              FROM DUAL

    Here is the thing,
    v_week_no(i) is a collection passing to the procedure, the parameter to this procedure is defined as out, so i have to get the same column as out variable and use that value in the next subsequent inserts.
    just calling this procedure will not give the same variable as output and use it in the next subsequent inserts
    PROCEDURE P_SAVE_WEIGH_IN_RECORD (
              p_USER_ID IN WEIGH_IN_RECORD.USER_ID%TYPE,
              p_WEEK_NUMBER IN OUT WEIGH_IN_RECORD.WEEK_NO%TYPE,
              p_WEIGH_IN_DATE IN OUT WEIGH_IN_RECORD.WEIGH_IN_DATE%TYPE,
              p_LOCATION_ID IN OUT WEIGH_IN_RECORD.LOCATION_ID%TYPE,
              p_HEIGHT IN OUT WEIGH_IN_RECORD.HEIGHT%TYPE,
              p_WEIGHT IN OUT WEIGH_IN_RECORD.WEIGHT%TYPE,
              p_NO_WEIGH_IN IN WEIGH_IN_RECORD.NO_WEIGH_IN_FLAG%TYPE,
              p_WEIGH_IN_NOTE_ID IN OUT WEIGH_IN_RECORD.WEIGH_IN_NOTE_ID%TYPE,
              p_WEIGHT_LOSS_PLAN_TYPE IN WEIGH_IN_RECORD.WEIGHT_LOSS_PLAN_TYPE_ID%TYPE,
              p_MEETING_USER_MAP_ID IN WEIGH_IN_RECORD.MEETING_USER_MAP_ID%TYPE,
              p_SITE_ID IN SITE.SITE_ID%TYPE
    IS
    m_WEIGHT NUMBER(10,4) := p_WEIGHT;
    m_HEIGHT NUMBER(10,4) := p_HEIGHT;
    BEGIN

  • Correct idea to scale out testing environment and test service pack2 installation

    Hi
    I have a sharepoint 2010 farm it has one sharepoint server, one database server
    In one server  below services are running
    Central administration service
    SharePoint Server Search 
    User Profile Service 
    Microsoft SharePoint Foundation Web Application
    so i want to scale out this form  to
    1 application server
    1 web front end server
    1 Search server (index server)
    1 databse server
    here how i scale out to this form
    1)here how i move  sharepoint  server search service to new  index server and
    2) here how i move  Microsoft SharePoint Foundation Web Application to new webfront end server
    and in this single server  some web appllications are running also how i move these to new wf server
    i want to do like this  because i want to test service pack 2 installation, now  sharepoint version is : service pack1
    my actual production environment has
    2 application servers
    2 webfront end servers
    2 index servers
    1 databae server
    so this correct idea to scale out testing environment and test service pack2 installation
    adil

    Hi Adil,
    The link below describes how to scale SharePoint Web Front-End with only web applications and the search query server  out of one SharePoint server with all roles running.
    http://sharepointsolutions.com/sharepoint-help/blog/2011/02/how-to-scale-out-a-sharepoint-2010-farm-from-two-tier-to-three-tier-by-adding-a-dedicated-application-server/
    Now you have two SharePoint server with:
    Tier 1 – SharePoint Server dedicated as a Web Front-End (WFE) with only the web application(s) and the search query service running on it
    Tier 2 – SharePoint Server dedicated as an Application Server with all of the other service applications running on it, but no web applications or query service
    Tier 3 – SQL Server for the databases
    Then you would scale out WFE server with web applications from tier1. Now please install a new SharePoint server and join it to the existing farm and deploy it as Web Front Server. Enable the relevant services on Web Front servers per the topology picture
    below, and stop the services running on the old server.
    http://technet.microsoft.com/en-us/library/cc263044(v=office.14).aspx
    Regards
    Rebecca Tu
    TechNet Community Support

  • XML Publisher, define variable and use out side the group

    Hi
    Is there any way that I can define a variable in the group and move XML data like line amount into that variable and use into outside the group.
    Regards
    ASIM

    I figured it out
    in your select if you want to group your output by say Organization_id change your select in your burst file to the following
    <xapi:request select="/PAYSLIP_REPORT/PAYSLIP/EMPLOYEE_DETAILS/ORGANIZATION_ID">

  • Extract Variables and Values out of a String

    Hello Everbody!
    I have a question, hope that anyone can help me.
    I have a string of this kind: "frame= 2255 q=0.0 size= 2739kB time=75.0 bitrate= 299.3kbits/s"
    Know I want to deconstruct it and extract the variables and
    values written in there. There is some Whitespace in it.
    After the extraction it have to look like this:
    frame=2255
    q=0.0
    Greetz Christian

    What is a StringTokenizer?http://java.sun.com/j2se/1.5.0/docs/api/java/util/StringTokenizer.html
    Can you give me an
    example? Would be great! http://www.google.com/search?q=java+stringtokenizer+example
    You can first use space as the delimiter, to get tokens
    a=b
    c=d
    etc.
    Then you can tokenize each of those tokens on =.
    However, this doesn't work if you can have spaces around the = or inside the values:
    a = b
    c="d e f"
    If you can have this, you'll have to take a different approach. String.split might serve you better in that case, but you'll have to learn a bit about regex first.
    Sun's Regular Expression Tutorial for Java
    Regular-Expressions.info

  • Printing OUT variables from a Stored Procedure

    Hi all,
    I'm running an SQL command that calls a Stored Procedure and passes in some value. I've pasted in the important parts of it below. What I am trying to do is access the OUT variables that have been assigned to the DECLARED variables. I come from a SQL Server background and there we can do "SELECT @variable" which will print it to screen. I'm trying to do something similar here.
    I need to access the contents of the three variables declared at the top of the script.
    Thanks in advance.
    DECLARE
    l_error_value NUMBER;
    l_error_product VARCHAR2 (10);
    l_CE_DOC_ID number;
    BEGIN
    PEM.create_enquiry   
         (      ce_cat => 'COMP'
                   , ce_class => 'FRML'
                   , error_value => l_ERROR_VALUE
                   ,error_product => l_ERROR_PRODUCT
                   , ce_doc_id => l_ce_doc_id
    END;

    Ah yes I see. Sorry I misunderstood what you were suggesting. I'm currently working on a test script that uses an approach similar to the one you mentioned, but I'm having trouble resolving foreign key relationships with test data.
    I've no access to the tables or anything so it's proving to be a time consuming task!!
    Is it required that all fields are given a value, even if they have a "DEFAULT" defined for them within the procedure. At the moment I'm using a rather cumbersome approach to this:
    i.e.
    With cmmAddRequest
        .ActiveConnection = strConnect
        .CommandType = adCmdText
        .CommandText = strSQL
        .Parameters(0).Direction = adParamInput
        .Parameters(1).Direction = adParamInput
        .Parameters(2).Direction = adParamInput
        .Parameters(3).Direction = adParamOutput
        .Parameters(4).Direction = adParamOutput
        .Parameters(5).Direction = adParamOutput
        .Parameters(0).Value = "COMP"
        .Parameters(1).Value = "FRML"
        .Parameters(2).Value = "1"
        .Execute
        WScript.Echo(.Parameters(5).Value)
    End With

  • Session variable and initialization block issues

    We are using OBIEE 10.1.3.3 and utilizes built in security features. (No LDAP or other single sign on). The user or group names are not stored in any external table. I have a need to supplement Group info of the user to the usage tracking we implemented recently as the NQ_LOGIN_GROUP.RESP column contains username instead of group name. So I created a session variable and associated with a new initialization block and also had a junk default value set to the variable. In the initialization block, I wrote the following query and as a result it inserted correct values into the table when the TEST button was clicked from the initialization block form.
    insert into stra_login_data (username, groupname, login_time) values ('VALUEOF(NQ_SESSION.USER)', 'VALUEOF(NQ_SESSION.GROUP)', SYSDATE)
    My intention is to make this execute whenever any user logs on. The nqserver.log reports the following error and it doesn?t insert values into the table.
    [nQSError: 13011] Query for Initialization Block 'SET_USER_LOGIN_BLOCK' has failed.
    [nQSError: 23006] The session variable, NQ_SESSION.USER, has no value definition.
    [nQSError: 13011] Query for Initialization Block 'SET_USER_LOGIN_BLOCK' has failed.
    [nQSError: 23006] The session variable, NQ_SESSION.GROUP, has no value definition.
    When I changed the insert statement as below, this does get populated whenever someone logs in. But I need the values of GROUP associated with the user as defined in the repository.
    insert into stra_login_data (username, groupname, login_time) values ('TEST_USER', TEST_GROUP', SYSDATE)
    Could someone help me out! As I mentioned above, I need the GROUP info into the usage tracking. So, if there is another successful approach, could you please share?
    Thank you
    Amin

    Hi Amin,
    See [this thread|http://forums.oracle.com/forums/thread.jspa?messageID=3376946&#3376946]. You can't use the GROUP session variable in an Init Block unless it has been seeded from an Init Block first. There isn't an easy solution for what you want, but here are some options:
    1) Create a copy of your User => Groups assignments in your RPD in an table so you can use it in your Usage Tracking Subject Area. But this means you will have to replicate the changes in two places so it's not a good solution.
    2) As the GROUP session variable is populated when you login you could theoretically use it a Dashboard and pass it a parameter to write the value to the database. But as I am not sure how can you make fire only once when the user logins it sounds like a bad idea.
    3) Move your User => Groups assignments from your RPD to a DB table. Use OBIEE Write Back or something like Oracle APEX to maintain them.
    I think 3) is the best solution to be honest.

  • 2.3.11 and 2.4.13 fail tests on OpenSuse 10.3 x86_64

    I am trying to get php and perl API of BDBXML 2.3.11 and 2.4.13 running on OpenSuse 10.3 x86_64
    when using --enable-perl the perl tests fail so i tried to run the test suite and compare it against 32bit builds.
    2.3.11
    after changing dbxml/dist/configure.ac like this:
    367c367
    <       LIBTSO_MODSUFFIX=@MODSUFFIX@
    LIBTSO_MODSUFFIX=$MODSUFFIX'make test' in dbxml/build_unix produces a ALL.OUT
    using:
    grep "^FAIL" -A 1 -B 1 dbxml-2.3.11/dbxml/build_unix/ALL.OUTstill produces lots of output. Since the 32bit version is working I compared the output produced on a 32bit ubuntu 07.10 with 64bit OpenSuse 10.3 which showed that following errors only occured on the 64bit system:
                            Xml003.3.1c: Put/get on both DB's
    FAIL:10:16:44 (00:00:00) dbxml_dump/dbxml_load(3.3.1.dbxml:unexpected hexadecimal value ' '
    load 3.3.1.dbxml-dumpload: Error: Invalid argument): expected 0, got 1
    FAIL:10:16:44 (00:00:00) Dump/load of 3.3.1.dbxml failed.
            8.8: Query timeout
    FAIL: should not have gotten here
    FAIL:10:17:04 (00:00:00) 8.8.8 returned error value 1
    FAIL:10:17:04 (00:00:00) 8.8.8: expected "1", got "0"
            8.8: Container not found
                    12.4.1: update with duplicate index entries
    FAIL:10:21:41 (00:00:00) dbxml_dump/dbxml_load(12.4.1.dbxml:unexpected hexadecimal value ' '
    load 12.4.1.dbxml-dumpload: Error: Invalid argument): expected 0, got 1
    FAIL:10:21:41 (00:00:00) Dump/load of 12.4.1.dbxml failed.there are more errors but they are not unique to the 64bit system. The shown messages repeat for different test settings(wholedoc/node - storage ...)
    the errors occurring in 3.3.1c and 12.4.1 can also be reproduced using dbxml,dbxml_dump and dbxml_load:
    ./dbxml -h /tmp
    dbxml>createcon test.dbxml
    dbxml>putdoc phone1 '<phone/>'
    dbxml>quit
    ./dbxml_dump -h /tmp/ -f /tmp/dbxml_2.3.11_test.dbxml.dump test.dbxml
    ./dbxml_load -h /tmp/ -f /tmp/dbxml_2.3.11_test.dbxml.dump test2.dbxml
    2.4.13
    The documentation states that the test should be run from within the tclsh, but I think make test should be supported too. (make test only works after adapting pathes to new location in dbxml/test/tcl/)
    similar procedure as above shows that the bug responsible for failing 3.3.1c and 12.4.1 is fixed
    and 8.8.8 still fails.
    Having a look at 8.8.8 my assumption is that the test fails simply because the machine is too fast (2.13Ghz Core2Duo) and executes the test query before the set timeout is triggered.
    Now back to perl:
    2.3.11 tests fail with:
    PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, '../blib/lib', '../blib/arch')" t/XmlManager.t
    t/XmlManager....ok 43/89BDB XML: unexpected hexadecimal value ' '           
    failed
    Error: Invalid argument in t/XmlManager.t, line 350
    # Looks like you planned 89 tests but only ran 51.
    t/XmlManager....dubious                                                     
            Test returned status 255 (wstat 65280, 0xff00)
    DIED. FAILED tests 52-89
            Failed 38/89 tests, 57.30% okay
    Failed Test    Stat Wstat Total Fail  Failed  List of Failed
    t/XmlManager.t  255 65280    89   76  85.39%  52-89
    Failed 1/1 test scripts, 0.00% okay. 38/89 subtests failed, 57.30% okay.after wrapping the call to loadContainer in test 51 in eval {} catch{}
    the output looks like this (no further failures)
    PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, '../blib/lib', '../blib/arch')" t/XmlManager.t
    t/XmlManager....ok 1/89BDB XML: unexpected hexadecimal value ' '            
    failed with std exception:Error: Invalid argument in t/XmlManager.t, line 350
    #   Failed test 'dump and load failed'
    #   in t/XmlManager.t at line 363.
    t/XmlManager....ok 53/89# Looks like you failed 1 test of 89.               
    t/XmlManager....dubious                                                     
            Test returned status 1 (wstat 256, 0x100)
    DIED. FAILED test 52
            Failed 1/89 tests, 98.88% okay
    Failed Test    Stat Wstat Total Fail  Failed  List of Failed
    t/XmlManager.t    1   256    89    1   1.12%  52
    Failed 1/1 test scripts, 0.00% okay. 1/89 subtests failed, 98.88% okay.luckily this is the only test that fails:
    PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, '../blib/lib', '../blib/arch')" t/*.t
    Failed Test    Stat Wstat Total Fail  Failed  List of Failed
    t/XmlManager.t    1   256    89    1   1.12%  522.4.13 tests fail with:
    PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, '../blib/lib', '../blib/arch')" t/*.t
    Failed Test Stat Wstat Total Fail Failed List of Failed
    t/XmlManager.t 1 256 89 1 1.12% 43
    t/XmlQueryContext.t 255 65280 33 62 187.88% 3-33
    t/XmlValue.t 1 256 248 1 0.40% 245
    looking at XmlManager test shows that it is not the same as above but something else
    PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, '../blib/lib', '../blib/arch')" t/XmlManager.t
    t/XmlManager....ok 32/89                                                    
    #   Failed test 'getIndexNodes'
    #   in t/XmlManager.t at line 275.
    t/XmlManager....ok 52/89# Looks like you failed 1 test of 89.               
    t/XmlManager....dubious                                                     
            Test returned status 1 (wstat 256, 0x100)
    DIED. FAILED test 43
            Failed 1/89 tests, 98.88% okay
    Failed Test    Stat Wstat Total Fail  Failed  List of Failed
    t/XmlManager.t    1   256    89    1   1.12%  43
    Failed 1/1 test scripts, 0.00% okay. 1/89 subtests failed, 98.88% okay.The other two tests seem to fail because the tests are not correct, but i haven't had the time to look at them yet. Here is the output:
    t/XmlQueryContext..........ok 1/33Bareword "XmlQueryContext::DeadValues" not allowed while "strict subs" in use at t/XmlQueryContext.t line 194, <DATA> line 225.
    Bareword "XmlQueryContext::DeadValues" not allowed while "strict subs" in use at t/XmlQueryContext.t line 195, <DATA> line 225.
    Execution of t/XmlQueryContext.t aborted due to compilation errors.
    # Looks like you planned 33 tests but only ran 2.
    # Looks like your test died just after 2.
    t/XmlQueryContext..........dubious                                          
            Test returned status 255 (wstat 65280, 0xff00)
    DIED. FAILED tests 3-33
            Failed 31/33 tests, 6.06% okay
    t/XmlValue.................ok 1/248                                         
    #   Failed test 'getLocalName'
    #   in t/XmlValue.t at line 410.
    #          got: ''
    #     expected: '#document'
    t/XmlValue.................NOK 245# Looks like you failed 1 test of 248.    
    t/XmlValue.................dubious                                          
            Test returned status 1 (wstat 256, 0x100)
    DIED. FAILED test 245
            Failed 1/248 tests, 99.60% okaySo my questions are:
    1. can and will the fix for dump/load be back ported to 2.3.11
    2. is my assumption about 8.8.8 correct
    3. is there a patch underway for perl on 2.4.13?
    4. were there other issues in 2.3.11 that have been fixed in 2.4.13 but not back ported. especially regarding perl and php APIs on 64bit platforms.
    I noticed that at least the patch provided in: PHP / BDB XML works fine on Red Hat Fedora 5, not on SuSE 10.2/Athlon 64 by djimenez was not incorporated into 2.3.11 (2.4.13 seems to be fixed)
    5. since there seems to be no publicly available php test suite yet, will there be one in the near future?
    all comments welcome,
    thanks
    Gordon

    for anyone interested this is a patch for 2.3.11 that backports 64bit php fixes from 2.4.13. It also contains some other changes:
    -additional php possibly wrong usage of long instead of int on 64 bit in db-4.5.20
    -perl see: Re: perl script segfaults on putDocument
    -dbxml tcl test: configure.ac LIBTSO_MODSUFFIX and setting the default tcl test to "run_all" instead of "run_xml"
    Please note: The code looks a bit strange because the [ i ] access into an array is interpreted by the forum software and converted to &lt;i&gt;. So you cannot directly copy the patch from browser but need to copy the raw html and modify it (e.g. pass it through sed).
    you'll need the &lt;pre&gt; &lt;/pre&gt; part from this post and exchange &lt;i&gt; for [ i ] (without spaces) and &lt;br&gt; for '\n'. Maybe it will work. :-)
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/db-4.5.20/php_db4/db4.cpp dbxml-2.3.11-64/db-4.5.20/php_db4/db4.cpp
    --- dbxml-2.3.11.orig/db-4.5.20/php_db4/db4.cpp     2006-09-16 03:20:58.000000000 +0200
    +++ dbxml-2.3.11-64/db-4.5.20/php_db4/db4.cpp     2008-05-30 18:35:43.000000000 +0200
    @@ -1203,7 +1203,7 @@
         DB_TXN *dbtxn = NULL;
         zval *dbtxn_obj = NULL;
         char file = NULL, database = NULL;
    -    long filelen = 0, databaselen = 0;
    +    int filelen = 0, databaselen = 0;
         DBTYPE type = DB_BTREE;
         u_int32_t flags = DB_CREATE;
         int mode = 0;
    @@ -2015,7 +2015,7 @@
         DbEnv *dbe;
         zval *self;
         char *home;
    -    long homelen;
    +    int homelen;
         u_int32_t flags = 0;
         self = getThis();
         getDbEnvFromThis(dbenv);
    @@ -2035,7 +2035,7 @@
         DB_ENV *dbenv;
         zval *self;
         char *dir;
    -    long dirlen;
    +    int dirlen;
         self = getThis();
         getDbEnvFromThis(dbenv);
         if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &dir, &dirlen) == FAILURE)
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/dist/configure.ac dbxml-2.3.11-64/dbxml/dist/configure.ac
    --- dbxml-2.3.11.orig/dbxml/dist/configure.ac     2007-01-19 16:52:44.000000000 +0100
    +++ dbxml-2.3.11-64/dbxml/dist/configure.ac     2008-06-02 18:30:41.000000000 +0200
    @@ -364,7 +364,7 @@
         LIBJSO_LN_INSTALL="test -f \$(libjso_base)-\$(SOVERSION).dylib && \$(ln) -f -s \$(libjso_base)-\$(SOVERSION).dylib \$(libjso_base)-\$(SOVERSION).jnilib";;
         LIBTSO_MODULE="-module"
    -     LIBTSO_MODSUFFIX=@MODSUFFIX@
    +     LIBTSO_MODSUFFIX=$MODSUFFIX
         LIBJSO_LN_BUILD=""
         LIBJSO_LN_INSTALL="";;
    esac
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/dbxml/db_rdbt.c dbxml-2.3.11-64/dbxml/src/dbxml/db_rdbt.c
    --- dbxml-2.3.11.orig/dbxml/src/dbxml/db_rdbt.c     2008-04-16 17:46:53.000000000 +0200
    +++ dbxml-2.3.11-64/dbxml/src/dbxml/db_rdbt.c     2008-06-04 18:01:55.000000000 +0200
    @@ -206,7 +206,7 @@
                        break;
                   buf[linelen++] = '\0';
              } else
    -               linelen = strlen(buf) + 1;
    +               linelen = (int) strlen(buf) + 1;
              start += linelen;
              if (name != NULL) {
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/dbxml/DbWrapper.cpp dbxml-2.3.11-64/dbxml/src/dbxml/DbWrapper.cpp
    --- dbxml-2.3.11.orig/dbxml/src/dbxml/DbWrapper.cpp     2008-04-16 17:46:53.000000000 +0200
    +++ dbxml-2.3.11-64/dbxml/src/dbxml/DbWrapper.cpp     2008-06-04 20:33:18.000000000 +0200
    @@ -219,7 +219,7 @@
         int version, ret, t_ret;
         DBTYPE dbtype;
         char *subdb;
    -     u_int32_t read_flags;
    +     u_int32_t read_flags, tflags;
         Dbt key, data;
         db_recno_t recno, datarecno;
         DB_ENV *dbenv = environment_ ? environment_->get_DB_ENV() : 0;
    @@ -252,11 +252,14 @@
              db_.err(ENOMEM, NULL);
              goto err;
    +     
    +     // work around gcc optimizer issue that seems to modify
    +     // read_flags (4.1.1 on 64-bit linux)
    +     tflags = read_flags;
         /* Get each key/data pair and add them to the database. */
         for (recno = 1;; ++recno) {
              if ((ret = __db_rdbt(dbenv, key.get_DBT(), data.get_DBT(),
    -                         read_flags, read_callback, in, lineno)) != 0) {
    +                         tflags, read_callback, in, lineno)) != 0) {
                   if (ret == EOF)
                        ret = 0;
                   break;
    @@ -267,7 +270,7 @@
                   break;
              case DB_KEYEXIST:
                   db_.errx("line %d: key already exists, not loaded:", *lineno);
    -               dbenv->prdbt(key.get_DBT(), read_flags & DB_READ_PRINTABLE,
    +               dbenv->prdbt(key.get_DBT(), tflags & DB_READ_PRINTABLE,
                             0, &std::cerr, pr_callback, 0);
                   break;
              default:
    @@ -602,9 +605,9 @@
         // but if incrementing the last byte results in a carry
         // (value overflows and goes back to zero), then we have
         // to increment the last-but-one byte - and so on.
    -     char maxPtr = (char )dbt.get_data();
    +     unsigned char maxPtr = (unsigned char )dbt.get_data();
         u_int32_t maxSize = dbt.get_size();
    -     char *pos = maxPtr + maxSize;
    +     unsigned char *pos = maxPtr + maxSize;
         for(--pos; pos >= maxPtr; --pos) {
              ++(*pos);
              if(*pos != 0) break;
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/perl/DbXml/DbXml.xs dbxml-2.3.11-64/dbxml/src/perl/DbXml/DbXml.xs
    --- dbxml-2.3.11.orig/dbxml/src/perl/DbXml/DbXml.xs     2006-11-22 23:56:13.000000000 +0100
    +++ dbxml-2.3.11-64/dbxml/src/perl/DbXml/DbXml.xs     2008-06-06 17:35:46.000000000 +0200
    @@ -1313,20 +1313,20 @@
             else if (sv_derived_from(contents, "XmlInputStream"))
                 XmlInputStream *s = GetObjPointer(contents, XmlInputStream);
    +            ClearObjPointer(contents);
                 if (txn)
                     RETVAL = THIS->putDocument(*txn, name, s, *context, flags);
                 else
                     RETVAL = THIS->putDocument(name, s, *context, flags);
    -            ClearObjPointer(contents);
             else if (sv_derived_from(contents, "XmlEventReader"))
                 XmlEventReader *s = GetObjPointer(contents, XmlEventReader);
    +            ClearObjPointer(contents);
                 if (txn)
                     RETVAL = THIS->putDocument(*txn, name, s, context, flags);
                 else
                     RETVAL = THIS->putDocument(name, s, context, flags);
    -            ClearObjPointer(contents);
             else
                 croak("putDocument parameter 2 should be an XmlInputStream, XmlEventReader or a string");
    @@ -1560,7 +1560,7 @@
         INIT:
             MY_TRY
         CLEANUP:
    -        ClearObjPointer(ST(1));
    +         ClearObjPointer(ST(1));
             MY_CATCH
    string
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/perl/DbXml/t/XmlManager.t dbxml-2.3.11-64/dbxml/src/perl/DbXml/t/XmlManager.t
    --- dbxml-2.3.11.orig/dbxml/src/perl/DbXml/t/XmlManager.t     2006-11-22 17:02:31.000000000 +0100
    +++ dbxml-2.3.11-64/dbxml/src/perl/DbXml/t/XmlManager.t     2008-06-06 17:31:39.000000000 +0200
    @@ -346,14 +346,28 @@
         ok -e "$tmp_dir/cont", "dumped content exists";
         my $new_container_name = "$tmp_dir/new";
    +    eval {
         $mgr->loadContainer($new_container_name, "$tmp_dir/cont");
    +   
         my $c1 = $mgr->openContainer($new_container_name);
         my $doc = $c1->getDocument('x') ;
    +
         my $cont = $doc->getContent();
    +
         is $cont, $content, "getContent ok" ;
    +    };
    +    if (my $e = catch std::exception)
    +    {
    +      warn "failed with std exception:" . $e->what() . "\n";
    +      ok 0, "dump and load failed with std::exception"
    +    }
    +    elsif ($@)
    +    {
    +      warn "failed\n";
    +      warn $@ . "\n";
    +      ok 0, "dump and load failed"
    +    }
         unlink "$tmp_dir/cont";
    if (my $e = catch std::exception)
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_container.cpp dbxml-2.3.11-64/dbxml/src/php/php_dbxml_container.cpp
    --- dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_container.cpp     2006-10-30 18:46:02.000000000 +0100
    +++ dbxml-2.3.11-64/dbxml/src/php/php_dbxml_container.cpp     2008-06-04 13:35:09.000000000 +0200
    @@ -36,7 +36,7 @@
       PHP_DBXML_STUFFED_THIS(XmlContainer);
       std::string buffer = This.getName();
    -  RETURN_STRINGL((char *)buffer.data(), buffer.length(), 1);
    +  DBXML_RETURN_STRINGL((char *)buffer.data(), buffer.length(), 1);
    PHP_DBXML_METHOD_END()
    @@ -97,7 +97,7 @@
       PHP_DBXML_STUFFED_THIS(XmlContainer);
       zval zctx = NULL, ztxn = NULL;
       char uri, name, *index;
    -  long urilen, namelen, indexlen;
    +  int urilen, namelen, indexlen;
       if(SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "sss|O",
           &uri, &urilen, &name, &namelen, &index, &indexlen,
           &zctx, php_dbxml_XmlUpdateContext_ce)) {
    @@ -125,7 +125,7 @@
       PHP_DBXML_STUFFED_THIS(XmlContainer);
       zval zctx = NULL, ztxn = NULL;
       char uri, name, *index;
    -  long urilen, namelen, indexlen;
    +  int urilen, namelen, indexlen;
       if(SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "sss|O",
           &uri, &urilen, &name, &namelen, &index, &indexlen,
           &zctx, php_dbxml_XmlUpdateContext_ce)) {
    @@ -153,7 +153,7 @@
       PHP_DBXML_STUFFED_THIS(XmlContainer);
       zval zctx = NULL, ztxn = NULL;
       char uri, name, *index;
    -  long urilen, namelen, indexlen;
    +  int urilen, namelen, indexlen;
       if(SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "sss|O",
           &uri, &urilen, &name, &namelen, &index, &indexlen,
           &zctx, php_dbxml_XmlUpdateContext_ce)) {
    @@ -180,8 +180,8 @@
       PHP_DBXML_STUFFED_THIS(XmlContainer);
       zval zctx = NULL, ztxn = NULL;
    -  char uri, name, *index;
    -  long urilen, namelen, indexlen;
    +  char *index;
    +  int indexlen;
       if(SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s|O",
           &index, &indexlen,
           &zctx, php_dbxml_XmlUpdateContext_ce)) {
    @@ -208,8 +208,8 @@
       PHP_DBXML_STUFFED_THIS(XmlContainer);
       zval zctx = NULL, ztxn = NULL;
    -  char uri, name, *index;
    -  long urilen, namelen, indexlen;
    +  char *index;
    +  int indexlen;
       if(SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s|O",
           &index, &indexlen,
           &zctx, php_dbxml_XmlUpdateContext_ce)) {
    @@ -236,8 +236,8 @@
       PHP_DBXML_STUFFED_THIS(XmlContainer);
       zval zctx = NULL, ztxn = NULL;
    -  char uri, name, *index;
    -  long urilen, namelen, indexlen;
    +  char *index;
    +  int indexlen;
       if(SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s|O",
           &index, &indexlen,
           &zctx, php_dbxml_XmlUpdateContext_ce)) {
    @@ -270,7 +270,7 @@
       PHP_DBXML_STUFFED_THIS(XmlContainer);
       zval *ztxn = NULL;
       char *name;
    -  long namelen;
    +  int namelen;
       long flags = 0;
       if(SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s|l",
           &name, &namelen, &flags)) {
    @@ -299,7 +299,7 @@
         PHP_DBXML_STUFFED_THIS(XmlContainer);
         zval *ztxn = NULL;
         char *handle;
    -     long handleLen;
    +     int handleLen;
         long flags = 0;
         if(SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s|l",
                                    &handle, &handleLen, &flags)) {
    @@ -325,7 +325,8 @@
       PHP_DBXML_STUFFED_THIS(XmlContainer);
       zval ztxn = NULL, zdoc = NULL, zstream = NULL, zctx = NULL;
       char name, contents;
    -  long namelen, contentslen, flags = 0;
    +  int namelen, contentslen;
    +  long flags = 0;
       /* XmlDocument */
       if(SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "O|Ol",
         &zdoc, php_dbxml_XmlDocument_ce,
    @@ -389,8 +390,7 @@
       PHP_DBXML_STUFFED_THIS(XmlContainer);
       zval ztxn = NULL, zdoc = NULL, zstream = NULL, zctx = NULL;
    -  char name, contents;
    -  long namelen, contentslen, flags = 0;
    +  long flags = 0;
       /* XmlDocument */
       if(SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "O|Ol",
         &zdoc, php_dbxml_XmlDocument_ce,
    @@ -421,7 +421,7 @@
       PHP_DBXML_STUFFED_THIS(XmlContainer);
       zval ztxn = NULL, zdoc = NULL, *zctx = NULL;
       char *name;
    -  long namelen, contentslen;
    +  int namelen;
       if(SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "O|O",
         &zdoc, php_dbxml_XmlDocument_ce,
         &zctx, php_dbxml_XmlUpdateContext_ce)) {
    @@ -462,8 +462,6 @@
       PHP_DBXML_STUFFED_THIS(XmlContainer);
       zval ztxn = NULL, zdoc = NULL, *zctx = NULL;
    -  char *name;
    -  long namelen, contentslen;
       if(SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "O|O",
         &zdoc, php_dbxml_XmlDocument_ce,
         &zctx, php_dbxml_XmlUpdateContext_ce)) {
    @@ -489,9 +487,9 @@
       PHP_DBXML_STUFFED_THIS(XmlContainer);
       zval ztxn = NULL, zctx = NULL, *zvl = NULL;
       char uri, name, *index;
    -  long urilen, namelen, indexlen;
    -  char puri, pname, *pindex;
    -  long purilen, pnamelen, pindexlen;
    +  int urilen, namelen, indexlen;
    +  char puri, pname;
    +  int purilen, pnamelen;
       long flags = 0;
       if(SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "Osss|Ol",
           &zctx, php_dbxml_XmlQueryContext_ce,
    @@ -582,9 +580,9 @@
       PHP_DBXML_STUFFED_THIS(XmlContainer);
       zval ztxn = NULL, zctx = NULL, *zvl = NULL;
       char uri, name, *index;
    -  long urilen, namelen, indexlen;
    -  char puri, pname, *pindex;
    -  long purilen, pnamelen, pindexlen;
    +  int urilen, namelen, indexlen;
    +  char puri, pname;
    +  int purilen, pnamelen;
       if(SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "sss|O",
           &uri, &urilen, &name, &namelen, &index, &indexlen,
           &zvl, php_dbxml_XmlValue_ce))
    @@ -660,7 +658,7 @@
       PHP_DBXML_STUFFED_THIS(XmlContainer);
       char *name;
    -  long namelen;
    +  int namelen;
       if(FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &namelen)) {
         return;
    @@ -672,7 +670,7 @@
       PHP_DBXML_STUFFED_THIS(XmlContainer);
       char *name;
    -  long namelen;
    +  int namelen;
       if(FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &namelen)) {
         return;
    @@ -712,9 +710,9 @@
       if(ztxn) {
         XmlTransaction txn = php_dbxml_get_XmlTransaction_object_pointer(ztxn TSRMLS_CC);
    -    RETURN_LONG(This.getNumDocuments(txn));
    +    DBXML_RETURN_LONG(This.getNumDocuments(txn));
       } else {
    -    RETURN_LONG(This.getNumDocuments());
    +    DBXML_RETURN_LONG(This.getNumDocuments());
    PHP_DBXML_METHOD_END()
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/php/php_dbxml.cpp dbxml-2.3.11-64/dbxml/src/php/php_dbxml.cpp
    --- dbxml-2.3.11.orig/dbxml/src/php/php_dbxml.cpp     2006-11-22 17:45:05.000000000 +0100
    +++ dbxml-2.3.11-64/dbxml/src/php/php_dbxml.cpp     2008-06-04 14:52:22.000000000 +0200
    @@ -50,7 +50,7 @@
         return;
    -  RETVAL_STRING((char*)dbxml_version(&M, &m, &p), 1);
    +  RETVAL_STRING((char*)dbxml_version(&M, &m, &p), (int)1);
       if (ZEND_NUM_ARGS()) {
         convert_to_long(maj);
    @@ -70,7 +70,7 @@
         return;
    -  DbXml::setLogLevel((DbXml::LogLevel)level, on);
    +  DbXml::setLogLevel((DbXml::LogLevel)level, (on != 0));
    static PHP_FUNCTION(dbxml_set_log_category)
    @@ -81,7 +81,7 @@
         return;
    -  DbXml::setLogCategory((DbXml::LogCategory)level, on);
    +  DbXml::setLogCategory((DbXml::LogCategory)level, (on != 0));
    function_entry dbxml_functions[] = {
    @@ -96,7 +96,7 @@
       zend_class_entry ce;
    #ifdef PHP_DBXML_EXCEPTIONS
    -  php_dbxml_init_exceptions();
    +  php_dbxml_init_exceptions(TSRMLS_C);
    #endif
       PHP_DBXML_REGISTER_CLASS(XmlData, php_dbxml_XmlData_dtor);
       PHP_DBXML_REGISTER_CLASS(XmlValue, php_dbxml_XmlValue_dtor);
    @@ -108,6 +108,7 @@
       PHP_DBXML_REGISTER_CLASS(XmlEventReader, php_dbxml_XmlEventReader_dtor);
       PHP_DBXML_REGISTER_CLASS(XmlEventReaderToWriter, php_dbxml_XmlEventReaderToWriter_dtor);
       PHP_DBXML_REGISTER_CLASS(XmlEventWriter, php_dbxml_XmlEventWriter_dtor);
    +  PHP_DBXML_REGISTER_CLASS(XmlIndexLookup, php_dbxml_XmlIndexLookup_dtor);
       PHP_DBXML_REGISTER_CLASS(XmlIndexSpecification, php_dbxml_XmlIndexSpecification_dtor);
       PHP_DBXML_REGISTER_CLASS(XmlModify, php_dbxml_XmlModify_dtor);
       PHP_DBXML_REGISTER_CLASS(XmlQueryContext, php_dbxml_XmlQueryContext_dtor);
    @@ -141,9 +142,14 @@
       REGISTER_LONG_CONSTANT( "DBXML_ENCRYPT", DBXML_ENCRYPT, CONST_CS | CONST_PERSISTENT);
       REGISTER_LONG_CONSTANT( "DBXML_GEN_NAME", DBXML_GEN_NAME, CONST_CS | CONST_PERSISTENT);
       REGISTER_LONG_CONSTANT( "DBXML_LAZY_DOCS", DBXML_LAZY_DOCS, CONST_CS | CONST_PERSISTENT);
    +  //REGISTER_LONG_CONSTANT( "DBXML_DOCUMENT_PROJECTION", DBXML_DOCUMENT_PROJECTION, CONST_CS | CONST_PERSISTENT);
    +  //REGISTER_LONG_CONSTANT( "DBXML_NO_AUTO_COMMIT", DBXML_NO_AUTO_COMMIT, CONST_CS | CONST_PERSISTENT);
       REGISTER_LONG_CONSTANT( "DBXML_CACHE_DOCUMENTS", DBXML_CACHE_DOCUMENTS, CONST_CS | CONST_PERSISTENT);
       REGISTER_LONG_CONSTANT( "DBXML_NO_INDEX_NODES", DBXML_NO_INDEX_NODES, CONST_CS | CONST_PERSISTENT);
       REGISTER_LONG_CONSTANT( "DBXML_INDEX_NODES", DBXML_INDEX_NODES, CONST_CS | CONST_PERSISTENT);
    +  //REGISTER_LONG_CONSTANT( "DBXML_NO_STATISTICS", DBXML_NO_STATISTICS, CONST_CS | CONST_PERSISTENT);
    +  //REGISTER_LONG_CONSTANT( "DBXML_STATISTICS", DBXML_STATISTICS, CONST_CS | CONST_PERSISTENT);
    +  REGISTER_LONG_CONSTANT( "DBXML_WELL_FORMED_ONLY", DBXML_WELL_FORMED_ONLY, CONST_CS | CONST_PERSISTENT);
       REGISTER_LONG_CONSTANT( "LEVEL_NONE", LEVEL_NONE, CONST_CS | CONST_PERSISTENT);
       REGISTER_LONG_CONSTANT( "LEVEL_DEBUG", LEVEL_DEBUG, CONST_CS | CONST_PERSISTENT);
       REGISTER_LONG_CONSTANT( "LEVEL_INFO", LEVEL_INFO, CONST_CS | CONST_PERSISTENT);
    @@ -237,6 +243,8 @@
       REGISTER_LONG_CONSTANT("XmlException_NULL_POINTER", XmlException::NULL_POINTER, CONST_CS | CONST_PERSISTENT);
       REGISTER_LONG_CONSTANT("XmlException_INDEXER_PARSER_ERROR", XmlException::INDEXER_PARSER_ERROR, CONST_CS | CONST_PERSISTENT);
       REGISTER_LONG_CONSTANT("XmlException_DATABASE_ERROR", XmlException::DATABASE_ERROR, CONST_CS | CONST_PERSISTENT);
    +  //REGISTER_LONG_CONSTANT("XmlException_QUERY_PARSER_ERROR", XmlException::QUERY_PARSER_ERROR, CONST_CS | CONST_PERSISTENT);
    +  //REGISTER_LONG_CONSTANT("XmlException_QUERY_EVALUATION_ERROR", XmlException::QUERY_EVALUATION_ERROR, CONST_CS | CONST_PERSISTENT);
       REGISTER_LONG_CONSTANT("XmlException_XPATH_PARSER_ERROR", XmlException::XPATH_PARSER_ERROR, CONST_CS | CONST_PERSISTENT);
       REGISTER_LONG_CONSTANT("XmlException_DOM_PARSER_ERROR", XmlException::DOM_PARSER_ERROR, CONST_CS | CONST_PERSISTENT);
       REGISTER_LONG_CONSTANT("XmlException_XPATH_EVALUATION_ERROR", XmlException::XPATH_EVALUATION_ERROR, CONST_CS | CONST_PERSISTENT);
    @@ -302,6 +310,9 @@
    #if COMPILE_DL_DBXML
    +#ifdef PHP_WIN32
    +#include "zend_arg_defs.c"
    +#endif
    BEGIN_EXTERN_C()
    ZEND_GET_MODULE(dbxml)
    END_EXTERN_C()
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_data.cpp dbxml-2.3.11-64/dbxml/src/php/php_dbxml_data.cpp
    --- dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_data.cpp     2006-10-30 18:46:02.000000000 +0100
    +++ dbxml-2.3.11-64/dbxml/src/php/php_dbxml_data.cpp     2008-06-04 14:58:27.000000000 +0200
    @@ -39,7 +39,7 @@
         WRONG_PARAM_COUNT;
    -  RETURN_STRINGL((char*)This.get_data(), This.get_size(), 1);
    +  DBXML_RETURN_STRINGL((char*)This.get_data(), This.get_size(), 1);
    } PHP_DBXML_METHOD_END()
    PHP_DBXML_METHOD_BEGIN(XmlData, set_data)
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_document.cpp dbxml-2.3.11-64/dbxml/src/php/php_dbxml_document.cpp
    --- dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_document.cpp     2006-10-30 18:46:02.000000000 +0100
    +++ dbxml-2.3.11-64/dbxml/src/php/php_dbxml_document.cpp     2008-06-04 15:00:30.000000000 +0200
    @@ -32,24 +32,6 @@
       RETURN_BOOL(This == other);
    } PHP_DBXML_METHOD_END()
    -PHP_DBXML_METHOD_BEGIN(XmlDocument, getName)
    -  PHP_DBXML_STUFFED_THIS(XmlDocument);
    -  std::string buffer = This.getName();
    -  RETURN_STRINGL((char *)buffer.data(), buffer.length(), 1);
    -} PHP_DBXML_METHOD_END()
    -PHP_DBXML_METHOD_BEGIN(XmlDocument, setName)
    -  PHP_DBXML_STUFFED_THIS(XmlDocument);
    -  char *name;
    -  long namelen;
    -  if(FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &namelen)) {
    -    return;
    -  This.setName(std::string(name, namelen));
    -} PHP_DBXML_METHOD_END()
    PHP_DBXML_METHOD_BEGIN(XmlDocument, getContent)
       PHP_DBXML_STUFFED_THIS(XmlDocument);
    @@ -62,7 +44,7 @@
       PHP_DBXML_STUFFED_THIS(XmlDocument);
       std::string buffer;
       This.getContent(buffer);
    -  RETURN_STRINGL((char *)buffer.data(), buffer.length(), 1);
    +  DBXML_RETURN_STRINGL((char *)buffer.data(), buffer.length(), 1);
    } PHP_DBXML_METHOD_END()
    PHP_DBXML_METHOD_BEGIN(XmlDocument, getContentAsEventReader)
    @@ -77,7 +59,7 @@
       PHP_DBXML_STUFFED_THIS(XmlDocument);
       zval *zv = NULL;
       if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &zv, php_dbxml_XmlEventWriter_ce)) {
    -    XmlEventWriter &writer = php_dbxml_get_XmlEventWriter_object_pointer(zv TSRMLS_DC);
    +    XmlEventWriter &writer = php_dbxml_get_XmlEventWriter_object_ref(zv TSRMLS_CC);
         This.getContentAsEventWriter(writer);
    } PHP_DBXML_METHOD_END()
    @@ -87,7 +69,7 @@
       PHP_DBXML_STUFFED_THIS(XmlDocument);
       zval zstr = NULL, zdat = NULL;
       char *content;
    -  long contentlen;
    +  int contentlen;
       if(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &content, &contentlen)) {
         This.setContent(std::string(content, contentlen));
    @@ -100,7 +82,7 @@
         This.setContentAsXmlInputStream(str);
       else if(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &zstr, php_dbxml_XmlEventReader_ce)) {
    -    XmlEventReader &reader = php_dbxml_get_XmlEventReader_object_pointer(zstr TSRMLS_DC);
    +    XmlEventReader &reader = php_dbxml_get_XmlEventReader_object_ref(zstr TSRMLS_CC);
         This.setContentAsEventReader(reader);
       else {
    @@ -123,7 +105,7 @@
       PHP_DBXML_STUFFED_THIS(XmlDocument);
       zval zvl = NULL, zdat = NULL;
       char uri, name;
    -  long urilen, namelen;
    +  int urilen, namelen;
       if(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss",
           &uri, &urilen, &name, &namelen)) {
         XmlValue vl;
    @@ -140,7 +122,7 @@
       PHP_DBXML_STUFFED_THIS(XmlDocument);
       zval zvl = NULL, zdat = NULL;
       char uri, name;
    -  long urilen, namelen;
    +  int urilen, namelen;
       if(SUCCESS == zend_parse_parameters(
              ZEND_NUM_ARGS() TSRMLS_CC, "ssO",
              &uri, &urilen, &name, &namelen,&zvl, php_dbxml_XmlValue_ce)) {
    @@ -150,11 +132,11 @@
    } PHP_DBXML_METHOD_END()
    +PHP_DBXML_STRING_GETTER_AND_SETTER(XmlDocument, Name);
    +
    function_entry php_dbxml_XmlDocument_methods[] = {
    PHP_ME(XmlDocument, XmlDocument, NULL, 0)
    -PHP_ME(XmlDocument, getName, NULL, 0)
    PHP_ME(XmlDocument, equals, NULL, 0)
    -PHP_ME(XmlDocument, setName, NULL, 0)
    PHP_ME(XmlDocument, getContent, NULL, 0)
    PHP_ME(XmlDocument, getContentAsString, NULL, 0)
    PHP_ME(XmlDocument, getContentAsEventReader, NULL, 0)
    @@ -163,6 +145,7 @@
    PHP_ME(XmlDocument, fetchAllData, NULL, 0)
    PHP_ME(XmlDocument, getMetaData, NULL, 0)
    PHP_ME(XmlDocument, setMetaData, NULL, 0)
    +PHP_DBXML_ME_GETTER_AND_SETTER(XmlDocument, Name)
    {NULL, NULL, NULL}
    /*  vim: set sts=2 ts=2 expandtab ai bs=2 : */
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_eventreader.cpp dbxml-2.3.11-64/dbxml/src/php/php_dbxml_eventreader.cpp
    --- dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_eventreader.cpp     2006-11-15 17:53:11.000000000 +0100
    +++ dbxml-2.3.11-64/dbxml/src/php/php_dbxml_eventreader.cpp     2008-06-04 15:01:44.000000000 +0200
    @@ -59,15 +59,15 @@
         PHP_DBXML_STUFFED_REF(XmlEventReader);
         int len;
         const unsigned char *val = This.getValue(len);
    -     RETURN_STRINGL((char *)val, len, 1);
    +     DBXML_RETURN_STRINGL((char *)val, len, 1);
    } PHP_DBXML_METHOD_END()
    PHP_DBXML_METHOD_BEGIN(XmlEventReader, getValueLen)
         PHP_DBXML_STUFFED_REF(XmlEventReader);
    -     int len;
    +        int len;
         (void) This.getValue(len);
    -     RETURN_LONG(len);
    +     DBXML_RETURN_LONG(len);
    } PHP_DBXML_METHOD_END()
    PHP_DBXML_METHOD_BEGIN(XmlEventReader, isAttributeSpecified)
    @@ -86,7 +86,7 @@
         if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index)) {
              RETURN_FALSE;
    -     RETURN_STRING((char *)This.getAttributeLocalName(index), 1);
    +     DBXML_RETURN_STRING((char *)This.getAttributeLocalName(index), 1);
    } PHP_DBXML_METHOD_END()
    PHP_DBXML_METHOD_BEGIN(XmlEventReader, getAttributeNamespaceURI)
    @@ -96,7 +96,7 @@
         if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index)) {
              RETURN_FALSE;
    -     RETURN_STRING((char *)This.getAttributeNamespaceURI(index), 1);
    +     DBXML_RETURN_STRING((char *)This.getAttributeNamespaceURI(index), 1);
    } PHP_DBXML_METHOD_END()
    PHP_DBXML_METHOD_BEGIN(XmlEventReader, getAttributePrefix)
    @@ -106,7 +106,7 @@
         if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index)) {
              RETURN_FALSE;
    -     RETURN_STRING((char *)This.getAttributePrefix(index), 1);
    +     DBXML_RETURN_STRING((char *)This.getAttributePrefix(index), 1);
    } PHP_DBXML_METHOD_END()
    PHP_DBXML_METHOD_BEGIN(XmlEventReader, getAttributeValue)
    @@ -116,7 +116,7 @@
         if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index)) {
              RETURN_FALSE;
    -     RETURN_STRING((char *)This.getAttributeValue(index), 1);
    +     DBXML_RETURN_STRING((char *)This.getAttributeValue(index), 1);
    } PHP_DBXML_METHOD_END()
    PHP_DBXML_METHOD_BEGIN(XmlEventReader, needsEntityEscape)
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_eventreadertowriter.cpp dbxml-2.3.11-64/dbxml/src/php/php_dbxml_eventreadertowriter.cpp
    --- dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_eventreadertowriter.cpp     2006-10-30 18:46:03.000000000 +0100
    +++ dbxml-2.3.11-64/dbxml/src/php/php_dbxml_eventreadertowriter.cpp     2008-06-03 18:02:40.000000000 +0200
    @@ -24,9 +24,9 @@
                  &wval, php_dbxml_XmlEventWriter_ce,
                  &ownsReader)) {
              XmlEventReader &reader =
    -               php_dbxml_get_XmlEventReader_object_pointer(rval TSRMLS_DC);
    +               php_dbxml_get_XmlEventReader_object_ref(rval TSRMLS_CC);
              XmlEventWriter &writer =
    -               php_dbxml_get_XmlEventWriter_object_pointer(wval TSRMLS_DC);
    +               php_dbxml_get_XmlEventWriter_object_ref(wval TSRMLS_CC);
              XmlEventReaderToWriter r2w(reader, writer, ownsReader);
              php_dbxml_set_XmlEventReaderToWriter_object_factory(
                   getThis(), r2w TSRMLS_CC);
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_eventwriter.cpp dbxml-2.3.11-64/dbxml/src/php/php_dbxml_eventwriter.cpp
    --- dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_eventwriter.cpp     2006-11-15 17:53:11.000000000 +0100
    +++ dbxml-2.3.11-64/dbxml/src/php/php_dbxml_eventwriter.cpp     2008-06-03 18:06:06.000000000 +0200
    @@ -29,7 +29,7 @@
         PHP_DBXML_STUFFED_REF(XmlEventWriter);
         char lname, prefix, uri, value;
    -     long lLen, pLen, uLen, vLen;
    +     int lLen, pLen, uLen, vLen;
         bool specified = true; // optional in PHP interface
         if (SUCCESS ==
             zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssss|b",
    @@ -46,10 +46,10 @@
    PHP_DBXML_METHOD_BEGIN(XmlEventWriter, writeText)
         PHP_DBXML_STUFFED_REF(XmlEventWriter);
    -     long type;
    +     int type;
         char *text;
    -     long unused; // length is ignored if passed to PHP's writeText
    -     long tLen;
    +     int unused; // length is ignored if passed to PHP's writeText
    +     int tLen;
         if (SUCCESS ==
             zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls|l", &type,
                          &text, &tLen, &unused))
    @@ -61,7 +61,7 @@
         PHP_DBXML_STUFFED_REF(XmlEventWriter);
         char target, data;
    -     long tLen, dLen;
    +     int tLen, dLen;
         if (SUCCESS ==
             zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &target,
                          &tLen, &data, &dLen))
    @@ -73,7 +73,7 @@
         PHP_DBXML_STUFFED_REF(XmlEventWriter);
         char lname, prefix, *uri;
    -     long lLen, pLen, uLen, nattrs;
    +     int lLen, pLen, uLen, nattrs;
         bool empty = false; // default in PHP
         if (SUCCESS ==
             zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sssl|b",
    @@ -90,7 +90,7 @@
         PHP_DBXML_STUFFED_REF(XmlEventWriter);
         char lname, prefix, *uri;
    -     long lLen, pLen, uLen;
    +     int lLen, pLen, uLen;
         if (SUCCESS ==
             zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss",
                          &lname, &lLen, &prefix, &pLen, &uri, &uLen)) {
    @@ -104,8 +104,8 @@
         PHP_DBXML_STUFFED_REF(XmlEventWriter);
         char *text;
    -     long unused; // length is ignored if passed
    -     long tLen;
    +     int unused; // length is ignored if passed
    +     int tLen;
         if (SUCCESS ==
             zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l",
                          &text, &tLen, &unused))
    @@ -119,7 +119,7 @@
         char *version = 0;
         char *encoding = 0;
         char *standalone = 0;
    -     long vLen, eLen, sLen;
    +     int vLen, eLen, sLen;
         if (SUCCESS ==
             zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sss",
                          &version, &vLen, &encoding, &eLen,
    @@ -140,7 +140,7 @@
         PHP_DBXML_STUFFED_REF(XmlEventWriter);
         char *name;
    -     long tLen;
    +     int tLen;
         bool expandedInfoFollows = true; // default this
         if (SUCCESS ==
             zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b",
    @@ -153,7 +153,7 @@
         PHP_DBXML_STUFFED_REF(XmlEventWriter);
         char *name;
    -     long tLen;
    +     int tLen;
         if (SUCCESS ==
             zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
                          &name, &tLen))
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_exception.cpp dbxml-2.3.11-64/dbxml/src/php/php_dbxml_exception.cpp
    --- dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_exception.cpp     2006-11-15 18:21:45.000000000 +0100
    +++ dbxml-2.3.11-64/dbxml/src/php/php_dbxml_exception.cpp     2008-06-04 15:03:30.000000000 +0200
    @@ -19,10 +19,14 @@
    PHP_DBXML_DECLARE_CLASS(XmlException);
    -void php_dbxml_init_exceptions()
    +void php_dbxml_init_exceptions(TSRMLS_D)
         zend_class_entry ce;
    +#if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION < 2)
         PHP_DBXML_REGISTER_CLASS_WITH_PARENT(XmlException, zend_exception_get_default(), php_dbxml_XmlException_dtor);
    +#else
    +     PHP_DBXML_REGISTER_CLASS_WITH_PARENT(XmlException, zend_exception_get_default(TSRMLS_C), php_dbxml_XmlException_dtor);
    +#endif
         zend_declare_property_long(php_dbxml_XmlException_ce, "code",
                           sizeof("code")-1, 0,
                           ZEND_ACC_PROTECTED TSRMLS_CC);
    @@ -43,7 +47,7 @@
                           ZEND_ACC_PROTECTED TSRMLS_CC);
    -void php_dbxml_throw_exception(const XmlException &xe)
    +void php_dbxml_throw_exception(const XmlException &xe TSRMLS_DC)
         zval *xml_ex;
         MAKE_STD_ZVAL(xml_ex);
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/php/php_dbxml.h dbxml-2.3.11-64/dbxml/src/php/php_dbxml.h
    --- dbxml-2.3.11.orig/dbxml/src/php/php_dbxml.h     2006-11-15 17:53:11.000000000 +0100
    +++ dbxml-2.3.11-64/dbxml/src/php/php_dbxml.h     2008-06-04 15:04:22.000000000 +0200
    @@ -20,7 +20,6 @@
    #ifndef PHP_DBXML_H
    #define PHP_DBXML_H
    extern zend_module_entry dbxml_module_entry;
    #define phpext_dbxml_ptr &dbxml_module_entry
    @@ -39,9 +38,7 @@
    #endif
    #ifdef PHP_DBXML_EXCEPTIONS
    -extern "C" {
    #include "zend_exceptions.h"
    #endif
    PHP_MINIT_FUNCTION(dbxml);
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_indexlookup.cpp dbxml-2.3.11-64/dbxml/src/php/php_dbxml_indexlookup.cpp
    --- dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_indexlookup.cpp     2006-10-30 18:46:03.000000000 +0100
    +++ dbxml-2.3.11-64/dbxml/src/php/php_dbxml_indexlookup.cpp     2008-06-04 15:08:05.000000000 +0200
    @@ -34,7 +34,7 @@
       index = This.getIndex();
    -  RETURN_STRINGL((char*)index.data(), index.length(), 1);
    +  DBXML_RETURN_STRINGL((char*)index.data(), index.length(), 1);
    } PHP_DBXML_METHOD_END()
    @@ -65,7 +65,7 @@
       index = This.getNodeURI();
    -  RETURN_STRINGL((char*)index.data(), index.length(), 1);
    +  DBXML_RETURN_STRINGL((char*)index.data(), index.length(), 1);
    } PHP_DBXML_METHOD_END()
    @@ -81,7 +81,7 @@
       index = This.getNodeName();
    -  RETURN_STRINGL((char*)index.data(), index.length(), 1);
    +  DBXML_RETURN_STRINGL((char*)index.data(), index.length(), 1);
    } PHP_DBXML_METHOD_END()
    @@ -112,7 +112,7 @@
       index = This.getParentURI();
    -  RETURN_STRINGL((char*)index.data(), index.length(), 1);
    +  DBXML_RETURN_STRINGL((char*)index.data(), index.length(), 1);
    } PHP_DBXML_METHOD_END()
    @@ -143,7 +143,7 @@
       index = This.getParentName();
    -  RETURN_STRINGL((char*)index.data(), index.length(), 1);
    +  DBXML_RETURN_STRINGL((char*)index.data(), index.length(), 1);
    } PHP_DBXML_METHOD_END()
    @@ -183,7 +183,7 @@
       zval *zv;
       long op;
       PHP_DBXML_STUFFED_THIS(XmlIndexLookup);
    -  if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "Ol", &zv, php_dbxml_XmlValue_ce, &op))
    +  if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "Ol", &zv, php_dbxml_XmlValue_ce, &op))
         WRONG_PARAM_COUNT;
    @@ -228,7 +228,7 @@
       zval *zv;
       long op;
       PHP_DBXML_STUFFED_THIS(XmlIndexLookup);
    -  if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "Ol", &zv, php_dbxml_XmlValue_ce, &op))
    +  if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "Ol", &zv, php_dbxml_XmlValue_ce, &op))
         WRONG_PARAM_COUNT;
    @@ -257,9 +257,8 @@
    PHP_DBXML_METHOD_BEGIN(XmlIndexLookup, setContainer)
       zval *zv;
    -  long op;
       PHP_DBXML_STUFFED_THIS(XmlIndexLookup);
    -  if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "O", &zv, php_dbxml_XmlContainer_ce))
    +  if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "O", &zv, php_dbxml_XmlContainer_ce))
         WRONG_PARAM_COUNT;
    @@ -276,19 +275,22 @@
       long flags = 0;
       PHP_DBXML_STUFFED_THIS(XmlIndexLookup);
    +#define SET_PTR(expr)  \
    +  XmlQueryContext c = php_dbxml_get_XmlQueryContext_object_pointer(zqc TSRMLS_CC); \
    +  XmlResults r = expr; \
    +  object_init_ex(return_value, php_dbxml_XmlResults_ce); \
    +  php_dbxml_set_XmlResults_object_pointer(return_value, r TSRMLS_CC);
    +
       if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC,
           "O|l", &zqc, php_dbxml_XmlQueryContext_ce, &flags)) {
    -    XmlQueryContext c = php_dbxml_get_XmlQueryContext_object_pointer(zqc TSRMLS_CC);
    -    XmlResults r = This.execute(c, flags);
    +    SET_PTR(This.execute(c, flags));
         php_dbxml_set_XmlResults_object_pointer(return_value, r TSRMLS_CC);
       } else if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC,
           "OO", &zt, php_dbxml_XmlTransaction_ce, &zqc, php_dbxml_XmlQueryContext_ce, &flags)) {
         XmlTransaction t = php_dbxml_get_XmlTransaction_object_pointer(zt TSRMLS_CC);
    -    XmlQueryContext c = php_dbxml_get_XmlQueryContext_object_pointer(zqc TSRMLS_CC);
    -    XmlResults r = This.execute(t,c,flags);
    -    php_dbxml_set_XmlResults_object_pointer(return_value, r TSRMLS_CC);
    +    SET_PTR(This.execute(t, c, flags));      
       } else {
         WRONG_PARAM_COUNT;
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_indexspecification.cpp dbxml-2.3.11-64/dbxml/src/php/php_dbxml_indexspecification.cpp
    --- dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_indexspecification.cpp     2006-10-30 18:46:03.000000000 +0100
    +++ dbxml-2.3.11-64/dbxml/src/php/php_dbxml_indexspecification.cpp     2008-06-04 15:08:49.000000000 +0200
    @@ -156,7 +156,7 @@
       if (This.find(std::string(uri, uri_len), std::string(name, name_len), index)) {
    -    RETURN_STRINGL((char*)index.data(), index.length(), 1);
    +    DBXML_RETURN_STRINGL((char*)index.data(), index.length(), 1);
       } else {
         RETURN_FALSE;
    @@ -175,7 +175,7 @@
       index = This.getDefaultIndex();
    -  RETURN_STRINGL((char*)index.data(), index.length(), 1);
    +  DBXML_RETURN_STRINGL((char*)index.data(), index.length(), 1);
    } PHP_DBXML_METHOD_END()
    @@ -191,9 +191,9 @@
           zval *el;
           MAKE_STD_ZVAL(el);
           array_init(el);
    -      add_assoc_stringl(el, "uri", (char *) uri.data(), uri.length(), 1);
    -      add_assoc_stringl(el, "name", (char *) name.data(), name.length(), 1);
    -      add_assoc_stringl(el, "index", (char *) index.data(), index.length(), 1);
    +      add_assoc_stringl(el, "uri", (char *) uri.data(), (int)uri.length(), (int)1);
    +      add_assoc_stringl(el, "name", (char *) name.data(), (int)name.length(), (int)1);
    +      add_assoc_stringl(el, "index", (char *) index.data(), (int)index.length(), (int)1);
           add_next_index_zval(return_value, el);
         return;
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_inputstream.cpp dbxml-2.3.11-64/dbxml/src/php/php_dbxml_inputstream.cpp
    --- dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_inputstream.cpp     2006-10-30 18:46:03.000000000 +0100
    +++ dbxml-2.3.11-64/dbxml/src/php/php_dbxml_inputstream.cpp     2008-06-03 18:12:07.000000000 +0200
    @@ -37,7 +37,7 @@
        Read a number of bytes and return them as a string */
    PHP_DBXML_METHOD_BEGIN(XmlInputStream, readBytes)
    -  long toread;
    +  int toread;
       PHP_DBXML_GETTHIS(XmlInputStream);
       if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &toread)) {
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_int.hpp dbxml-2.3.11-64/dbxml/src/php/php_dbxml_int.hpp
    --- dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_int.hpp     2006-11-15 17:53:11.000000000 +0100
    +++ dbxml-2.3.11-64/dbxml/src/php/php_dbxml_int.hpp     2008-06-04 15:57:38.000000000 +0200
    @@ -11,14 +11,21 @@
    # include "config.h"
    #endif
    +// this is here to work around a PHP build issue on Windows
    +#include <iostream>
    +
    extern "C" {
    #include "php.h"
    #include "php_ini.h"
    #include "ext/standard/info.h"
    +#ifdef PHP_WIN32
    +#include "php_db4.h"
    +#else
    #include "ext/db4/php_db4.h"
    +#endif
    +#include "php_dbxml.h"
    #include <exception>
    -#include "php_dbxml.h"
    #include "dbxml/DbXml.hpp"
    using namespace DbXml;
    @@ -34,7 +41,7 @@
    #define PHP_DBXML_METHOD_END()           \
    } catch(XmlException &xe) {           \
    -  php_dbxml_throw_exception(xe);         \
    +  php_dbxml_throw_exception(xe TSRMLS_CC);         \
    catch(std::exception &e) {                     \
       php_error_docref(NULL TSRMLS_CC, E_WARNING, e.what()); \
    @@ -53,6 +60,15 @@
    #endif
    +// encapsulate calls to RETURN_STRINGL macro in PHP
    +#define DBXML_RETURN_STRINGL(d, l, s) \
    +    RETURN_STRINGL((char*)(d),(int)(l), (s))
    +
    +#define DBXML_RETURN_STRING(d, s) \
    +    RETURN_STRING((char*)(d),(int)(s))
    +
    +#define DBXML_RETURN_LONG(l) RETURN_LONG((long)(l))
    +
    static inline void php_dbxml_set_object_pointer(zval object, int type, void ptr TSRMLS_DC)
       zval *z;
    @@ -120,10 +136,13 @@
         zend_list_addref(Z_RESVAL_PP(prop));
    -/* fun with those on-the-stack-only style object (XmlContainer) that have their own magic refcounts */
    +/*
    + * macros to handle the Xml* objects
    + * "object_pointer" really means object reference (e.g. XmlDocument &)
    + */
    #define PHP_DBXML_STUFFED_INSTANCES(class_type) \
    -  class php_dbxml_stuffed_##class_type { \
    +  struct php_dbxml_stuffed_##class_type { \
       public: class_type stuffed; \
       php_dbxml_stuffed_##class_type(class_type &s): stuffed(s) {} \
    @@ -136,7 +155,7 @@
         struct php_dbxml_stuffed_##class_type *s = new struct php_dbxml_stuffed_##class_type(instance); \
         php_dbxml_set_object_pointer(object, le_##class_type, s TSRMLS_CC); \
    -  static inline class_type php_dbxml_get_##class_type##_object_pointer(zval *object TSRMLS_DC) { \
    +  static inline class_type & php_dbxml_get_##class_type##_object_pointer(zval *object TSRMLS_DC) { \
         struct php_dbxml_stuffed_##class_type s = (struct php_dbxml_stuffed_##class_type ) \
             php_dbxml_get_object_pointer(object, le_##class_type, php_dbxml_##class_type##_ce, #class_type TSRMLS_CC); \
         if (s) { return s->stuffed; } /* does internal addref */ \
    @@ -147,12 +166,14 @@
         delete s; \
    -// this is nearly identical to STUFFED_INSTANCES, above, with the exception
    -// that it stores an object reference, not an actual instance, which
    -// changes the member variable to a reference, along with the
    -// accessor's return value.  Everything else is identical.
    +/*
    + * this is nearly identical to STUFFED_INSTANCES, above, with the exception
    + * that it stores an object reference, not an actual instance, which
    + * changes the member variable to a reference, along with the
    + * accessor's return value.  Everything else is identical.
    + */
    #define PHP_DBXML_STUFFED_REFERENCES(class_type) \
    -  class php_dbxml_stuffed_##class_type { \
    +  struct php_dbxml_stuffed_##class_type { \
       public: class_type &stuffed; \
       php_dbxml_stuffed_##class_type(class_type &s): stuffed(s) {} \
    @@ -165,7 +186,7 @@
         struct php_dbxml_stuffed_##class_type *s = new struct php_dbxml_stuffed_##class_type(instance); \
         php_dbxml_set_object_pointer(object, le_##class_type, s TSRMLS_CC); \
    -  static inline class_type &php_dbxml_get_##class_type##_object_pointer(zval *object TSRMLS_DC) { \
    +  static inline class_type &php_dbxml_get_##class_type##_object_ref(zval *object TSRMLS_DC) { \
         struct php_dbxml_stuffed_##class_type s = (struct php_dbxml_stuffed_##class_type ) \
             php_dbxml_get_object_pointer(object, le_##class_type, php_dbxml_##class_type##_ce, #class_type TSRMLS_CC); \
         if (s) { return s->stuffed; } /* does internal addref */ \
    @@ -177,10 +198,10 @@
    #define PHP_DBXML_STUFFED_THIS(class_type)  \
    -  class_type This = php_dbxml_get_##class_type##_object_pointer(getThis() TSRMLS_CC);
    +  class_type &This = php_dbxml_get_##class_type##_object_pointer(getThis() TSRMLS_CC);
    #define PHP_DBXML_STUFFED_REF(class_type)                    \
    -  class_type &This = php_dbxml_get_##class_type##_object_pointer(getThis() TSRMLS_CC);
    +  class_type &This = php_dbxml_get_##class_type##_object_ref(getThis() TSRMLS_CC);
    #define PHP_DBXML_DECLARE_CLASS(class_type) \
       int le_##class_type; \
    @@ -197,7 +218,7 @@
         int i;
         for(i = 0; fe.handler; i++) {
    fe[i].fname = strdup(fe[i].fname);
    - zend_str_tolower(fe[i].fname, strlen(fe[i].fname));
    + zend_str_tolower(fe[i].fname, (unsigned int)strlen(fe[i].fname));
    @@ -241,6 +262,27 @@
    This->set##propname((proptype)val); \
    +#define PHP_DBXML_STRING_GETTER_AND_SETTER(class_type, propname) \
    +PHP_METHOD(class_type, get##propname)  \
    +{                                      \
    + PHP_DBXML_GETTHIS(class_type); \
    + if (ZEND_NUM_ARGS()) {               \
    + WRONG_PARAM_COUNT; \
    + } \
    + std::string str = This->get##propname(); \
    + DBXML_RETURN_STRINGL((char*)str.data(), str.length(), 1); \
    +} \
    +PHP_METHOD(class_type, set##propname)  \
    +{                                      \
    + char *val;                           \
    + int val_len; \
    + PHP_DBXML_GETTHIS(class_type); \
    + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &val, &val_len)) { \
    + RETURN_FALSE; \
    + } \
    + This->set##propname(std::string(val, val_len)); \
    +}
    +
    PHP_DBXML_EXTERN_CLASS(XmlContainer);
    PHP_DBXML_EXTERN_CLASS(XmlData);
    PHP_DBXML_EXTERN_CLASS(XmlManager);
    @@ -261,8 +303,8 @@
    PHP_DBXML_EXTERN_CLASS(XmlInputStream);
    PHP_DBXML_EXTERN_CLASS(XmlValue);
    #ifdef PHP_DBXML_EXCEPTIONS
    -extern void php_dbxml_init_exceptions();
    -extern void php_dbxml_throw_exception(const XmlException &xe);
    +extern void php_dbxml_init_exceptions(TSRMLS_D);
    +extern void php_dbxml_throw_exception(const XmlException &xe TSRMLS_DC);
    PHP_DBXML_EXTERN_CLASS(XmlException);
    PHP_DBXML_STUFFED_INSTANCES(XmlException);
    #endif
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_manager.cpp dbxml-2.3.11-64/dbxml/src/php/php_dbxml_manager.cpp
    --- dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_manager.cpp     2006-10-30 18:46:04.000000000 +0100
    +++ dbxml-2.3.11-64/dbxml/src/php/php_dbxml_manager.cpp     2008-06-04 15:13:37.000000000 +0200
    @@ -8,7 +8,6 @@
    #include "php_dbxml_int.hpp"
    -#include "ext/db4/php_db4.h"
    ZEND_RSRC_DTOR_FUNC(php_dbxml_XmlManager_dtor)
    @@ -35,7 +34,7 @@
    if (dbenv_obj) {
    - dbenv = php_db4_getDbEnvFromObj(dbenv_obj);
    + dbenv = php_db4_getDbEnvFromObj(dbenv_obj TSRMLS_CC);
    This = new XmlManager(DbEnv::get_DbEnv(dbenv), (unsigned int)flags);
    } else {
    This = new XmlManager((unsigned int)flags);
    @@ -63,7 +62,7 @@
    PHP_DBXML_GETTHIS(XmlManager);
    char *name;
    - long namelen;
    + int namelen;
    int ret = 0;
    if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &namelen)) {
         ret = This->existsContainer(std::string(name, namelen));
    @@ -76,7 +75,8 @@
    char *name;
    // these must be the same as BDB XML defaults
    - long namelen, flags = 0, mode = 0;
    + int namelen;
    + long flags = 0, mode = 0;
    XmlContainer::ContainerType type = XmlContainer::NodeContainer;
    zval *ztxn = NULL;
    PHP_DBXML_GETTHIS(XmlManager);
    @@ -108,7 +108,8 @@
    PHP_DBXML_METHOD_BEGIN(XmlManager, openContainer)
    char *name;
    - long namelen, flags = 0, mode = 0;
    + int namelen;
    + long flags = 0, mode = 0;
    XmlContainer::ContainerType type = XmlContainer::NodeContainer;
    zval *ztxn = NULL;
    PHP_DBXML_GETTHIS(XmlManager);
    @@ -138,7 +139,7 @@
    PHP_DBXML_GETTHIS(XmlManager);
    zval *ztxn = NULL;
    char *name;
    - long namelen;
    + int namelen;
    if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s", &name, &namelen)) {
    This->removeContainer(std::string(name, namelen));
    } else if(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os", &ztxn, php_dbxml_XmlTransaction_ce, &name, &namelen)) {
    @@ -156,7 +157,7 @@
    zval *ztxn = NULL;
    XmlTransaction *txn = NULL;
    char name, newname;
    - long namelen, newnamelen;
    + int namelen, newnamelen;
    if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "ss", &name, &namelen, &newname, &newnamelen)) {
    This->renameContainer(std::string(name, namelen), std::string(newname, newnamelen));
    } else if(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os", &ztxn, php_dbxml_XmlTransaction_ce, &name, &namelen, &newname, &newnamelen)) {
    @@ -174,7 +175,7 @@
    PHP_DBXML_METHOD_BEGIN(XmlManager, createMemBufInputStream)
    char buffer, bufID;
    - long bufferlen, bufIDlen;
    + int bufferlen, bufIDlen;
    PHP_DBXML_GETTHIS(XmlManager);
    if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &buffer, &bufferlen, &bufID, &bufIDlen)) {
    return;
    @@ -200,7 +201,7 @@
    PHP_DBXML_METHOD_BEGIN(XmlManager, createQueryContext)
    PHP_DBXML_GETTHIS(XmlManager);
    - long rt = (long) XmlQueryContext::LiveValues, et = (long) XmlQueryContext::Eager;
    + int rt = (int) XmlQueryContext::LiveValues, et = (int) XmlQueryContext::Eager;
    if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ll", &rt, &et)) {
    return;
    @@ -228,8 +229,7 @@
    zval *ztxn = NULL;
    zval *zctx = NULL;
    char *query;
    - long querylen;
    - XmlQueryContext *context;
    + int querylen;
    if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s|O", &query, &querylen, &zctx, php_dbxml_XmlQueryContext_ce)) {
    if(zctx) {
    @@ -264,7 +264,8 @@
    zval *ztxn = NULL;
    zval *zctx = NULL;
    char *query;
    - long querylen, flags = 0;
    + int querylen;
    + long flags = 0;
    if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s|Ol", &query, &querylen, &zctx, php_dbxml_XmlQueryContext_ce, &flags)) {
    if(zctx) {
    @@ -346,14 +347,15 @@
    return;
    XmlContainer cont = php_dbxml_get_XmlContainer_object_pointer(zc TSRMLS_CC);
    + XmlIndexLookup lu;
    if(zv == NULL) {
    XmlValue value = XmlValue();
    - XmlIndexLookup lookup = This->createIndexLookup(cont, std::string(uri, uri_len), std::string(name, name_len), std::string(index, index_len), value, (XmlIndexLookup::Operation) flags);
    - php_dbxml_set_XmlIndexLookup_object_factory(return_value, lookup TSRMLS_CC);
    + lu = This->createIndexLookup(cont, std::string(uri, uri_len), std::string(name, name_len), std::string(index, index_len), value, (XmlIndexLookup::Operation) flags);
    + php_dbxml_set_XmlIndexLookup_object_factory(return_value, lu TSRMLS_CC);
    } else {
    XmlValue value = php_dbxml_get_XmlValue_object_pointer(zv TSRMLS_CC);
    - XmlIndexLookup lookup = This->createIndexLookup(cont, std::string(uri, uri_len), std::string(name, name_len), std::string(index, index_len), value, (XmlIndexLookup::Operation) flags);
    - php_dbxml_set_XmlIndexLookup_object_factory(return_value, lookup TSRMLS_CC);
    + lu = This->createIndexLookup(cont, std::string(uri, uri_len), std::string(name, name_len), std::string(index, index_len), value, (XmlIndexLookup::Operation) flags);
    + php_dbxml_set_XmlIndexLookup_object_factory(return_value, lu TSRMLS_CC);
    PHP_DBXML_ADDREF(getThis());
    @@ -383,7 +385,7 @@
    zval *zuc = NULL;
    char *name;
    long flags = 0;
    - long namelen;
    + int namelen;
    if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s|Ol", &name, &namelen, &zuc, php_dbxml_XmlUpdateContext_ce, &flags)) {
    } else if(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os|Ol", &ztxn, php_dbxml_XmlTransaction_ce, &name, &namelen, &zuc, php_dbxml_XmlUpdateContext_ce, &flags)) {
    } else {
    @@ -408,7 +410,7 @@
    zval *zuc = NULL;
    char *name;
    long flags = 0;
    - long namelen;
    + int namelen;
    if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s|Ol", &name, &namelen, &zuc, php_dbxml_XmlUpdateContext_ce, &flags)) {
    } else if(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os|Ol", &ztxn, php_dbxml_XmlTransaction_ce, &name, &namelen, &zuc, php_dbxml_XmlUpdateContext_ce, &flags)) {
    } else {
    @@ -433,7 +435,7 @@
    zval *zuc = NULL;
    char *name;
    long flags = 0;
    - long namelen;
    + int namelen;
    if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "s|Ol", &name, &namelen, &zuc, php_dbxml_XmlUpdateContext_ce, &flags)) {
    } else if(SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os|Ol", &ztxn, php_dbxml_XmlTransaction_ce, &name, &namelen, &zuc, php_dbxml_XmlUpdateContext_ce, &flags)) {
    } else {
    @@ -454,7 +456,7 @@
    PHP_DBXML_GETTHIS(XmlManager);
    std::string buffer = This->getHome();
    - RETURN_STRINGL((char *)buffer.data(), buffer.length(), 1);
    + DBXML_RETURN_STRINGL((char *)buffer.data(), buffer.length(), 1);
    PHP_DBXML_METHOD_END()
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_modify.cpp dbxml-2.3.11-64/dbxml/src/php/php_dbxml_modify.cpp
    --- dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_modify.cpp     2006-10-30 18:46:04.000000000 +0100
    +++ dbxml-2.3.11-64/dbxml/src/php/php_dbxml_modify.cpp     2008-06-04 15:14:42.000000000 +0200
    @@ -29,7 +29,7 @@
    zval zexp, zres;
    long type;
    char name, content;
    - long name_len, content_len;
    + int name_len, content_len;
    PHP_DBXML_STUFFED_THIS(XmlModify);
    if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET,
    @@ -66,7 +66,7 @@
    zval zexp, zres;
    long type;
    char name, content;
    - long name_len, content_len;
    + int name_len, content_len;
    PHP_DBXML_STUFFED_THIS(XmlModify);
    if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET,
    @@ -103,7 +103,7 @@
    zval zexp, zres;
    long type, location = -1;
    char name, content;
    - long name_len, content_len;
    + int name_len, content_len;
    PHP_DBXML_STUFFED_THIS(XmlModify);
    if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET,
    @@ -140,7 +140,7 @@
    zval *zexp;
    char *content;
    - long content_len;
    + int content_len;
    PHP_DBXML_STUFFED_THIS(XmlModify);
    if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os", &zexp, php_dbxml_XmlQueryExpression_ce,
    @@ -159,7 +159,7 @@
    zval *zexp;
    char *content;
    - long content_len;
    + int content_len;
    PHP_DBXML_STUFFED_THIS(XmlModify);
    if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os", &zexp, php_dbxml_XmlQueryExpression_ce,
    @@ -208,8 +208,6 @@
    PHP_DBXML_METHOD_BEGIN(XmlModify, execute)
    - char *encoding;
    - int encoding_len;
    zval zv, zqc, zuc, zt;
    PHP_DBXML_STUFFED_THIS(XmlModify);
    diff -Naur -x '*xerces-c-src*' -x '*build_unix*' -x '*configure' -x '*Builder.pm' -x '*More.pm' -x'*const-c.inc' -x '*setup.py' dbxml-2.3.11.orig/dbxml/src/php/php_dbxml_querycontext.cpp dbxml-2.3.11-64/dbxml/src/php/php_dbxml_querycontext.cpp
    --- dbxml-2.3.11.orig/dbxml/

  • Problem with out variable

    I have been working for months with java and all of a sudden today when i was compiling a program i got an error stating that the variable out can't be.
    To confirm my suspicion that somrhtings wrong i wrote this program and tested it
    class Example
         public static void main(String args[])
              System.out.println("This is my first program");
    }And i get this error when i compile
    Cannot find symbol
    variable out
    All this time the JRE was ok and now this unexpected problem.Whats happening?It works if I import java.lang.System and run the program.I have been working for months and this is the first time.Is it because of some virus or something.Should i reinstall the JDK.I thought of asking at the forum before i could try reinstalling and checking it out again.

    .. Where do you get this error? Eclipse has a bug
    which is related to this. Sometimes I have to remove
    the JRE from installed JREs in Eclipse, and then just
    add it again, and then everything works.
    KajI don't use an IDE.I use the command prompt.I get the error at the command prompt.
    My computer has two OS both XP.I jdk 1.5 installed on both these OS.I run the jdk on the first jdk which is on the active partition and when it stopped working on this one i immediately restarted the pc and started the other xp where i have installed jdk 1.5 too.But even there it's the same case.
    But if any environment variables or registry contents have changed thats local to the first xp but how will it effect the second xp.Is it because of any virus
    Please note i will be going out and will get back to the thread in around 2 hours.Thanks a lot of the response.

  • How can I pass a variable from Test Stand to CVI by reference

    Hi!
    I can't to pass numeric or boolean variable from Test Stand (for example: FileGlobals.StopFlag) into the step (CVI function).
    Function prototype: 
    void __declspec(dllexport) __cdecl PC2_WaitWhileResponceAppear(tTestData *testData, tTestError *testError, int *iStopFlag).
    When variable has bin changed I can't see this change from my function.
    CVI 2010, Test Stand 2010
    Can anybody help me?

    Hey Rombar,
    It is certainly possible to pass variables by reference; for example, if you go to <TestStand Directory>/Examples/Demo/C and open the computer.seq file, you can see one of the example sequences that uses CVI modules. If you click on one of these steps, you'll see that some of the parameters, such as the error information, is passed with pointers. This is a pass by reference.
    To help narrow this down, it'd be good for us to figure out a few things about how the code is run. First, if you go to Configure > Adapters, select the CVI adapter and choose Configure, you can see options for this adapter. Do you have it configured to run in an external instance of CVI or as an in-process call?
    Also, if you're wanting to see a change made in TestStand in your external code, this makes me think that you're wanting to run the code and then continue to execute your TestStand sequence while the code runs. How did you configure this behavior? For example, are you calling this code as a separate sequence in a new thread, or are you using another method to run this code while the sequence continues to run?
    Finally, if we could see a screenshot of how you're configuring the parameters on the TestStand step, that might be helpful as well.
    Daniel E.
    TestStand Product Support Engineer
    National Instruments

  • Oracle Test Harness

    Hi,
    I've read the article named "Out-of-Container EJB 3.0 Testing with Oracle Entity Test Harness (by Debu Panda)" in http://www.oracle.com/technology/pub/articles/debu_testability_of_ejb.html.
    Where is it supposed to be locate the ectest.jar file???
    I've just downloaded Oracle Toplink DP4 and OAS 10.1.3 DP4 but I can't find it.
    Thanks in advanced.

    Hi Bjorn,
    I've posted the same question a couple of time (see out-of-container Oracle EJB30 Test - ectest.jar location but nobody seems to know the answer.
    Please let me know ([email protected]) if you get to know where is the ectest.jar file located (the same way, I'll tell you if I do).
    Thank you very much.

  • Oracle Test Harness - ectest.jar location

    Hi,
    I've read the article named "Out-of-Container EJB 3.0 Testing with Oracle Entity Test Harness (by Debu Panda)" in http://www.oracle.com/technology/pub/articles/debu_testability_of_ejb.html.
    Where is it supposed to be locate the ectest.jar file???
    I've just downloaded Oracle Toplink DP4 and OAS 10.1.3 DP4 but I can't find it.
    Thanks in advanced.

    Hi Bjorn,
    I've posted the same question a couple of time (see out-of-container Oracle EJB30 Test - ectest.jar location but nobody seems to know the answer.
    Please let me know ([email protected]) if you get to know where is the ectest.jar file located (the same way, I'll tell you if I do).
    Thank you very much.

  • Creating a Test Harness

    Hi there ....
    I have this problem, basically, my self and a few of my class mates have built this program as part of our module and we now need to have a Test Harness to run and log our Test Cases.
    I have all the test cases arranged in .txt files and plan on using the 'Test Harness' to read test cases from these files, feed it to our program and then log the output from our programe (the methods) yet again on another .txt file. We have the feature for logging, in the formatted required.
    However, non of us has built a test harness before and it looks like a complex procedure, the problem is we dont know how to approach it.
    We can test methods that return a value but we dont know how to use the test harness to test void methods that pass data to components or call other methods.
    I would appriciate any form of help.
    Cheers

    Hi yawmark,
    I appologise for including a poor code example ealier on, i had to come up with something quick. I will however, visit the sugeted sites you mentioned, thank you.
    I did however, create a simple class that compiles and can be used to set, return, reset and print a few details about a person. I hope that is of better use than my previous example. here it is:
    public class SimplePerson {
        int age = 0;
        String firstName = "";
        String lastName = "";
        /** Creates a new instance of SimplePerson */
        public SimplePerson() {
        /** Sets the age of this person */
        private void setAge(int takeAge){
            age = takeAge;
        /** Returns the age of this person */
        private int getAge(){
            return age;
        /** Sets the First Name of this person */
        private void setFirstName(String takeName){
            firstName = takeName;
        /** Returns the First Name of this person */
        private String getFirstName(){
            return firstName;
        /** Sets the Last Name of this person */
        private void setLastName(String takeName){
            firstName = takeName;
        /** Returns the Last Name of this person */
        private String getLastName(){
            return firstName;
        /** Resets the details of this person back to back to
         *  the default form.
        private void resetAll(){
            age = 0;
            firstName = "";
            lastName = "";
        /** Prints all the details this person has */
        private void printAll(){
            System.out.println("Age: " +Integer.toString(age)
                    + "\n First Name: " + firstName
                    + "\n Last Name: " + lastName );
    }Cheers mate

  • What is difference between local variable and property node ?

    What is difference between local variable and property node ?
    " 一天到晚游泳的鱼"
    [email protected]
    我的个人网站:LabVIEW——北方客栈 http://www.labview365.com
    欢迎加入《LabVIEW编程思想》组——http://decibel.ni.com/content/groups/thinking-in-labview

    To make things clear, here are two small examples that show how nasty locals and value properties can be to the naive programmer.
    - Open the diagram of the race condition.vi before running it and try to predict what will be the values of the two counters after the third run.
    - Use the Compare Locals Properties and Wires.vi to find out how slow locals and value properties can be (times 1000+).
    This being demonstrated, I must add that I use globals and value properties quite often, because they are often very convenient
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Race condition.vi ‏9 KB
    Compare Locals Properties and Wires.vi ‏18 KB

  • Remote and testing server don't see root relative links the same

    My site works fine on my testing server (Apache, MYSQL,
    PHP). I use root relative links in a library
    file (include file) so that it will work with all pages. For the testing server these links look like this:
    /my_sites_root_folder/aaa/bbb/ccc etc.
    If I use these same links on the remote server they won't work. To get hem to work I have to change all these links to the form
    /aaa/bbb/ccc etc.
    When dreamweaver uploads files to the remote server, the site name folder  (my_sites_root_folder) doesn't go along for the ride--just the files in it. So on the remote all the site files are stored in htdocs. On my testing server, the files are stored in htdocs/my_site_root_folder.
    I think it must have something to do with the way I'm setting up the remote and testing servers, but I'm read a hundred pages of instructions without being able to figure it out. I think I'm just seeing something wrong, but I've already spent days on this. Can someone please point me in the right direction?
    I'm using DWCS5. Internet explorer 8, Windows 7.

    Thank you for your prompt response. I'm afraid I'm still totally puzzled here. It sounds like you're very knowledeable about your comments, but I would like to know more. I accept that using the local site root in links would be bad, but I'm not clear WHY. Structuring the links as I have doesn't cause any links to break. I've structured them this way because it's the only way I can find that everything works. But I still do not understand WHY I have to do it. Using different libary include files doesn't seem like a good way to go, though
    You suggest that if I use any root relative links at all, I need to use vitual hosts. I'm not finding any good coverage of what these are, and especially why they are necessary. If this is the case, does that imply that templates (which use root relative links) also will not work on the test server (at least without vitual hosts)? The conclusion I'm coming up with, given your remarks, is "Dreamweaver doesn't work with root relevant links when you're trying to test a site with a test server." Is this right?

Maybe you are looking for

  • How to change imovie text color?

    I am adding titles and subtitles to my film but, suddenly, all text of the completed film turned white! Since the background for the text is also white, this means that letters are barely visible. I've spent two hours trying to fix the problem, using

  • Possible to upgrade HD on a MacBook Pro?

    I have a 15" laptop of the previous generation that I bought about two years ago. I have run out of storage space on the hard drive. I have done all the file shuffling and deleting and archiving I can. It's no use. I can't find any more room on this

  • Troubles importing Flash 10 Animation with 3D Transform

    I am looking for any workaround/experiences for importing a Flash 10 animation with 3D transforms. Currently, doing this will wig out Captivate 4 and break the embedded animation in all sorts of ways. AS3 support in Captivate is turned on and the sam

  • Dynamic vlan assignment with 1242AG and IAS not working

                       I'm having trouble getting the dynamic vlan assignment to work on my 1242AG Cisco Aironet APs. I've seen multiple cases with a similar setup and configuration where it works just fine.  I've tried everything I can think of.  Any su

  • How to control budgeting from PR or PO?

    Hi All, when I create new PR or PO and match Project Number that set budgeting. I want thse system check budgeting before, If total PR or PO is over budgeting in any task of project I want system show message to inform message. Please advice me. Than