error: cannot convert ‘__shedskin__::str*’ to ‘const char*’

41 views
Skip to first unread message

Tom

unread,
Oct 29, 2013, 9:59:49 PM10/29/13
to shedskin...@googlegroups.com
I'm trying to wrap the output of shedskin with a C++ library that has a function the needs a normal string. Is it possible to convert __shedskin__::str* to const char*?

Jérémie Roquet

unread,
Oct 30, 2013, 6:36:35 AM10/30/13
to shedskin-discuss
Hi Tom,

2013/10/30 Tom <tomb...@gmail.com>:
> I'm trying to wrap the output of shedskin with a C++ library that has a
> function the needs a normal string. Is it possible to convert
> __shedskin__::str* to const char*?

yourString->unit.c_str() should be enough.

Best regards,

--
Jérémie

Mark Dufour

unread,
Oct 30, 2013, 6:58:31 AM10/30/13
to shedskin-discuss
hi jeremie,

nice to see you still follow the list :-) work on shedskin has been a bit slow the last few months, because of a job change (to zarafa.com). though we've had a few rather nice releases recently..

mark.



--
Jérémie

--
You received this message because you are subscribed to the Google Groups "shedskin-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shedskin-discu...@googlegroups.com.
To post to this group, send email to shedskin...@googlegroups.com.
Visit this group at http://groups.google.com/group/shedskin-discuss.
For more options, visit https://groups.google.com/groups/opt_out.



--
http://www.youtube.com/watch?v=E6LsfnBmdnk
Message has been deleted

Jérémie Roquet

unread,
Oct 31, 2013, 7:54:31 AM10/31/13
to shedskin-discuss
Hi again,

2013/10/31 Tom <tomb...@gmail.com>:
> How about converting an __ss_int to just a normal int?

__ss_int is basically a typedef for int. You don't even need a cast.

If you're using the -l or --long option of shedskin, __ss_int becomes
a typedef for long long, that is, a large integer. In this case, you
might want to use long long too, to avoid losing large values.

Best regards,

--
Jérémie

Tom

unread,
Oct 31, 2013, 10:36:21 AM10/31/13
to shedskin...@googlegroups.com
Thanks got it working.
Reply all
Reply to author
Forward
0 new messages