Hi,

>I'm implementing a function (LoadURL) which takes a single argument of 

>const wxString&. wxString is implemented in the main Wx typemap, but not 
>a 
const version. If I try neglecting the const in my .xs file I'm told:

<snip>


>... Clearly I'm swinging in the dark here <:-) I'm working my way slowly 

>towards understanding everything that's actually going on so I can have 
>a 
proper go at this.
>
>In the meantime I wondered if there was a reason const 
wxString hadn't 
>been implemented before?

  Basically, it's not needed: if 
you are writing XS, just use 'wxString' in the
function declaration; if you are 
using XS++ (see below) 'const wxString &'
should work just fine.

>I grepped 
and found it in some of the main Wx package .xs files, but 
>always inside a 
structure like " %name{Wx::TextCtrlBase} class 
>wxTextCtrlBase {... " and I 
don't recognise that syntax /at all/. The Wx 
>package features strongly when 
doing a Google Code Search for "%name{". 
>What is it?

  It's a more compact, 
C++-like syntax, parsed by ExtUtils::XSpp and converted 
into plain XS before 
being parsed by xsubpp.

HTH
Mattia

Reply via email to