David Fletcher | 1 Jun 16:46 2009

PHP argout question, std_string.i improvements


Hi all,

I have a C++ function that directly returns a bool, but also returns a
string using the OUTPUT/argout machinery:

    %apply std::string* OUTPUT { std::string* output_value };

    class Attributes
    {
     public:
      bool			FindValue(const std::string& key,
				      std::string* output_value) const;
		...

This doesn't work, because the std_string.i interface file (in the
Lib/php directory of the SWIG distribution) appears to lack typemaps
for argout, etc.  I've enhanced this file and have included it below.
I'd appreciate any feedback on this.  Does anyone see any errors?

While this generates C++ code that compiles, the interface doesn't
work.  I believe this is because an array isn't generated for the
FindValue() function (which now returns multiple values).

>From looking at the Source/Modules/php.cxx file, I don't see any
support for handling multiple return values.  Presuming my analysis is
correct, I'd like to start adding support for this.

I do have a question: what's the simplest way to determine how many
values are returned by a function?  Is there an attribute that can be
(Continue reading)

SourceForge.net | 3 Jun 16:22 2009
Picon
Picon

[ swig-Bugs-2800537 ] Member fields in a namespace result in multiple SWIG types

Bugs item #2800537, was opened at 2009-06-03 10:22
Message generated for change (Tracker Item Submitted) made by portmanteaufu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=101645&aid=2800537&group_id=1645

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: lua
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Zack S. (portmanteaufu)
Assigned to: Mark Gossage (mgossage)
Summary: Member fields in a namespace result in multiple SWIG types

Initial Comment:
[This is my first bug report, so please let me know if I need to provide further clarification or additional information.]

My problem is very similar to this long-closed bug: https://sourceforge.net/tracker/index.php?func=detail&aid=782778&group_id=1645&atid=101645

I have a Lua module that I've created with a very large number of C++ classes. Some of the classes are declared
within a namespace, like so:

namespace NS1 {
  class myClass {
      public:
        NS2::someDataType memberField;
(Continue reading)

SourceForge.net | 3 Jun 17:56 2009
Picon
Picon

[ swig-Bugs-2800537 ] Member fields in a namespace result in multiple SWIG types

Bugs item #2800537, was opened at 2009-06-03 10:22
Message generated for change (Comment added) made by portmanteaufu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=101645&aid=2800537&group_id=1645

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: lua
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Zack S. (portmanteaufu)
Assigned to: Mark Gossage (mgossage)
Summary: Member fields in a namespace result in multiple SWIG types

Initial Comment:
[This is my first bug report, so please let me know if I need to provide further clarification or additional information.]

My problem is very similar to this long-closed bug: https://sourceforge.net/tracker/index.php?func=detail&aid=782778&group_id=1645&atid=101645

I have a Lua module that I've created with a very large number of C++ classes. Some of the classes are declared
within a namespace, like so:

namespace NS1 {
  class myClass {
      public:
        NS2::someDataType memberField;
(Continue reading)

SourceForge.net | 4 Jun 19:17 2009
Picon
Picon

[ swig-Bugs-2800537 ] Member fields in a namespace result in multiple SWIG types

Bugs item #2800537, was opened at 2009-06-03 10:22
Message generated for change (Comment added) made by portmanteaufu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=101645&aid=2800537&group_id=1645

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: lua
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Zack S. (portmanteaufu)
Assigned to: Mark Gossage (mgossage)
Summary: Member fields in a namespace result in multiple SWIG types

Initial Comment:
[This is my first bug report, so please let me know if I need to provide further clarification or additional information.]

My problem is very similar to this long-closed bug: https://sourceforge.net/tracker/index.php?func=detail&aid=782778&group_id=1645&atid=101645

I have a Lua module that I've created with a very large number of C++ classes. Some of the classes are declared
within a namespace, like so:

namespace NS1 {
  class myClass {
      public:
        NS2::someDataType memberField;
(Continue reading)

SourceForge.net | 4 Jun 20:07 2009
Picon
Picon

[ swig-Bugs-2800537 ] Member fields in a namespace result in multiple SWIG types

Bugs item #2800537, was opened at 2009-06-03 10:22
Message generated for change (Comment added) made by portmanteaufu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=101645&aid=2800537&group_id=1645

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: lua
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Zack S. (portmanteaufu)
Assigned to: Mark Gossage (mgossage)
Summary: Member fields in a namespace result in multiple SWIG types

Initial Comment:
[This is my first bug report, so please let me know if I need to provide further clarification or additional information.]

My problem is very similar to this long-closed bug: https://sourceforge.net/tracker/index.php?func=detail&aid=782778&group_id=1645&atid=101645

I have a Lua module that I've created with a very large number of C++ classes. Some of the classes are declared
within a namespace, like so:

namespace NS1 {
  class myClass {
      public:
        NS2::someDataType memberField;
(Continue reading)

SourceForge.net | 4 Jun 20:47 2009
Picon
Picon

[ swig-Bugs-2800537 ] Member fields in a namespace result in multiple SWIG types

Bugs item #2800537, was opened at 2009-06-03 14:22
Message generated for change (Comment added) made by wsfulton
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=101645&aid=2800537&group_id=1645

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: lua
Group: None
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Zack S. (portmanteaufu)
Assigned to: Mark Gossage (mgossage)
Summary: Member fields in a namespace result in multiple SWIG types

Initial Comment:
[This is my first bug report, so please let me know if I need to provide further clarification or additional information.]

My problem is very similar to this long-closed bug: https://sourceforge.net/tracker/index.php?func=detail&aid=782778&group_id=1645&atid=101645

I have a Lua module that I've created with a very large number of C++ classes. Some of the classes are declared
within a namespace, like so:

namespace NS1 {
  class myClass {
      public:
        NS2::someDataType memberField;
(Continue reading)

SourceForge.net | 5 Jun 18:42 2009
Picon
Picon

[ swig-Bugs-2801824 ] function overloading: int version hides bool version

Bugs item #2801824, was opened at 2009-06-05 18:42
Message generated for change (Tracker Item Submitted) made by stefaanlippens
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=101645&aid=2801824&group_id=1645

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: python
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Stefaan Lippens (stefaanlippens)
Assigned to: Nobody/Anonymous (nobody)
Summary: function overloading: int version hides bool version

Initial Comment:
I have the following problem with building a Python interface to overloaded functions in C++.

The easiest is to explain with an example. Say I have these two functions:
-----------------------------------------------------------
void fun(int i) {
    cout << "fun(int " << i << ")" << endl;
}
void fun(bool b) {
    cout << "fun(bool " << b << ")" << endl;
}
--------------------------------------------------
(Continue reading)

SourceForge.net | 5 Jun 20:00 2009
Picon
Picon

[ swig-Bugs-2801824 ] function overloading: int version hides bool version

Bugs item #2801824, was opened at 2009-06-05 12:42
Message generated for change (Comment added) made by jlcherry
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=101645&aid=2801824&group_id=1645

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: python
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Stefaan Lippens (stefaanlippens)
Assigned to: Nobody/Anonymous (nobody)
Summary: function overloading: int version hides bool version

Initial Comment:
I have the following problem with building a Python interface to overloaded functions in C++.

The easiest is to explain with an example. Say I have these two functions:
-----------------------------------------------------------
void fun(int i) {
    cout << "fun(int " << i << ")" << endl;
}
void fun(bool b) {
    cout << "fun(bool " << b << ")" << endl;
}
--------------------------------------------------
(Continue reading)

Xin Shuai | 4 Jun 07:27 2009
Picon

operator[] ignored

Hi:

  Is there anybody who can tell me that how to handle warnings(389)?
operator[] ignored (consider using %extend)

I tried %rename according to the manual but that didn't work! I don't know how to use %extend to solve the problem.

Thanks!

--
Xin Shuai (David)
PhD of Complex System in School of Informatics
Indiana University Bloomington
812-606-8019
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
Miklos Vajna | 6 Jun 14:25 2009
Picon

Second week report

Hi,

This week:

I passed all except one of my exams (I'll hopefully pass the last one
next week), and I *think* I now mostly understand how the Python module
and it directors (Source/Modules/python.cxx, Lib/python/) work.

Next week:

According to the milestone list from my proposal, the next step is to
read the PHP module source as well as the relevant part of the Zend API
documentation (zend_call_function() and friends).

Hopefully that'll be the last week when I just read source code /
documentation, then I can continue with writing testcases! :-)
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get

Gmane