We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 679c478 commit b54a5b4Copy full SHA for b54a5b4
lib/Language/nativecall.pod
@@ -85,6 +85,16 @@ routine itself.
85
Note that a null string can be passed by passing the Str type object; a null
86
return will also be represented by the type object.
87
88
+For string arguments that are specified as C<const char *> it is necessary
89
+to tell Perl not to free the memory allocated to the C string after the
90
+function returns using C<explicity-manage> :
91
+
92
+ # C prototype is set_foo(const char * foo)
93
+ sub set_foo(Str) is native('libfoo') { * }
94
+ my $string = "FOO";
95
+ explicitly-manage($string);
96
+ set_foo($string);
97
98
=head1 Basic use of Pointers
99
100
Sometimes you need to get a pointer (for example, a library handle) back from a
0 commit comments