Skip to content

SF Bug #1283 - #2

Closed
BrantKyser wants to merge 2 commits into
swig:masterfrom
BrantKyser:SFbug1283
Closed

BrantKyser wants to merge 2 commits into
swig:masterfrom
BrantKyser:SFbug1283

Conversation

@BrantKyser

Copy link
Copy Markdown
Contributor

Add test case for using smart pointers in conjunction with directors.

Patch Java language module to allow the use of smart pointers with directors.

This test case exercise directors used in conjunction with smart pointers.
* Change the name of the memory own variable for base java director classes to match that expected by the director code
* Add conditional to appropriately dynamically cast director classes wrapped in smart pointers.
@wsfulton

wsfulton commented Jan 4, 2013

Copy link
Copy Markdown
Member

Thanks very much... nice patch and testcase.

I've pulled this patch using:

curl https://github.com/swig/swig/pull/2.patch | git am

which worked a treat, but am a bit disappointed that now github does not detect the pull request and close it.

@wsfulton

wsfulton commented Jan 4, 2013

Copy link
Copy Markdown
Member

Trying the Close & Comment button to close it out manually.

@wsfulton wsfulton closed this Jan 4, 2013
@wsfulton

wsfulton commented Jan 4, 2013

Copy link
Copy Markdown
Member

The network graph https://github.com/swig/swig/network did not detect the pull request like it did for pull request 1: #1. I'll try the

git pull origin pull/123/head

approach suggested by DarthGrandalf in #1 for the next pull request and see what happens. Would be nice to have the network graph up to date though.

@BrantKyser BrantKyser mentioned this pull request Jan 12, 2013
jgillis pushed a commit to jgillis/swig that referenced this pull request Apr 20, 2015
[MATLAB] Added support for multiple function outputs
wsfulton pushed a commit that referenced this pull request May 21, 2017
jschueller added a commit to jschueller/swig that referenced this pull request May 10, 2021
This fixes a leak detected using ASAN from SwigPyClientData_New:

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x7faf628f5bc8 in malloc (/usr/lib/gcc/x86_64-linux-gnu/9/libasan.so+0x10dbc8)
    #1 0x7faf52f5bda0 in SwigPyClientData_New /home/schueller/projects/openturns/schueller/build2/python/src/CMakeFiles/geom.dir/geom_modulePYTHON_wrap.cxx:1345
    swig#2 0x7faf52f5dad3 in NearestNeighbourAlgorithmImplementation_swigregister /home/schueller/projects/openturns/schueller/build2/python/src/CMakeFiles/geom.dir/geom_modulePYTHON_wrap.cxx:5528
    swig#3 0x5c3a3f in cfunction_vectorcall_O ../Objects/methodobject.c:482

I dont have a minimal reproducer, but it may be because I use multiple
swig module.
jschueller added a commit to jschueller/swig that referenced this pull request May 12, 2021
This fixes a leak detected using ASAN from SwigPyClientData_New:

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x7faf628f5bc8 in malloc (/usr/lib/gcc/x86_64-linux-gnu/9/libasan.so+0x10dbc8)
    #1 0x7faf52f5bda0 in SwigPyClientData_New /home/schueller/projects/openturns/schueller/build2/python/src/CMakeFiles/geom.dir/geom_modulePYTHON_wrap.cxx:1345
    swig#2 0x7faf52f5dad3 in NearestNeighbourAlgorithmImplementation_swigregister /home/schueller/projects/openturns/schueller/build2/python/src/CMakeFiles/geom.dir/geom_modulePYTHON_wrap.cxx:5528
    swig#3 0x5c3a3f in cfunction_vectorcall_O ../Objects/methodobject.c:482

I dont have a minimal reproducer, but it may be because I use multiple
swig module.
wsfulton pushed a commit that referenced this pull request Oct 14, 2022
expand testcase to test for new casting behavior
wsfulton pushed a commit that referenced this pull request Mar 25, 2023
Update octruntime.swg to work with Octave v8.1.0
christophe-calmejane added a commit to christophe-calmejane/swig that referenced this pull request Jan 9, 2026
When using std::optional with enum types that have unsigned underlying types
(uint8_t, uint16_t, uint32_t, uint64_t), the generated C# code was passing
unsigned values (byte, ushort, uint, ulong) to Marshal.WriteXXX methods that
expect signed types (sbyte, short, int, long).

This caused compilation errors like:
  error CS1503: Argument swig#2 cannot convert 'ulong' expression to type 'long'
christophe-calmejane added a commit to christophe-calmejane/swig that referenced this pull request Jan 9, 2026
When using std::optional with enum types that have unsigned underlying types
(uint8_t, uint16_t, uint32_t, uint64_t), the generated C# code was passing
unsigned values (byte, ushort, uint, ulong) to Marshal.WriteXXX methods that
expect signed types (sbyte, short, int, long).

This caused compilation errors like:
  error CS1503: Argument swig#2 cannot convert 'ulong' expression to type 'long'
christophe-calmejane added a commit to christophe-calmejane/swig that referenced this pull request Jan 9, 2026
When using std::optional with enum types that have unsigned underlying types
(uint8_t, uint16_t, uint32_t, uint64_t), the generated C# code was passing
unsigned values (byte, ushort, uint, ulong) to Marshal.WriteXXX methods that
expect signed types (sbyte, short, int, long).

This caused compilation errors like:
  error CS1503: Argument swig#2 cannot convert 'ulong' expression to type 'long'
christophe-calmejane added a commit to christophe-calmejane/swig that referenced this pull request Apr 1, 2026
When using std::optional with enum types that have unsigned underlying types
(uint8_t, uint16_t, uint32_t, uint64_t), the generated C# code was passing
unsigned values (byte, ushort, uint, ulong) to Marshal.WriteXXX methods that
expect signed types (sbyte, short, int, long).

This caused compilation errors like:
  error CS1503: Argument swig#2 cannot convert 'ulong' expression to type 'long'
christophe-calmejane added a commit to christophe-calmejane/swig that referenced this pull request May 20, 2026
When using std::optional with enum types that have unsigned underlying types
(uint8_t, uint16_t, uint32_t, uint64_t), the generated C# code was passing
unsigned values (byte, ushort, uint, ulong) to Marshal.WriteXXX methods that
expect signed types (sbyte, short, int, long).

This caused compilation errors like:
  error CS1503: Argument swig#2 cannot convert 'ulong' expression to type 'long'
christophe-calmejane added a commit to christophe-calmejane/swig that referenced this pull request Sep 1, 2026
When using std::optional with enum types that have unsigned underlying types
(uint8_t, uint16_t, uint32_t, uint64_t), the generated C# code was passing
unsigned values (byte, ushort, uint, ulong) to Marshal.WriteXXX methods that
expect signed types (sbyte, short, int, long).

This caused compilation errors like:
  error CS1503: Argument swig#2 cannot convert 'ulong' expression to type 'long'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants