[Kde-bindings] smoke usage - how to create new bindings

Arno Rehn arno at arnorehn.de
Mon Aug 3 19:39:32 UTC 2009


On Monday 03 August 2009 19:29:33 Chris Burel wrote:
> Yes, I'd love for that information to be more centrally avaliable.  It
> would've helped me a lot when starting on PerlQt4.
>
> I'm not sure that everything's 100% correct, someone wanna look over
> it before we put it on the techbase?
There's just one thing under "Building the argument stack".
There's the line

	stack[1].s_voidp = (void*)new char[14]("Hello, World!");

This will allocate memory that will never be freed. Either delete the memory 
afterwards or pass it the string directly with

	stack[1].s_voidp = (void*) "Hello, World!";

Otherwise, the article looks really good to me and ready to be put on 
techbase.

> On Mon, Aug 3, 2009 at 9:29 AM, Arno Rehn<arno at arnorehn.de> wrote:
> > On Monday 03 August 2009 17:47:36 Jonathan Yu wrote:
> >> On Mon, Aug 3, 2009 at 11:38 AM, Arno Rehn<arno at arnorehn.de> wrote:
> >> > On Monday 03 August 2009 17:33:44 Petr Vanek wrote:
> >> >> hi all,
> >> >>
> >> >> I'd like to create a Qt4 bindings for new language and Smoke seems to
> >> >> be "The Solution" for this task.
> >> >>
> >> >> Unfortunately there is no documentation for Smoke. So I studied ruby
> >> >> (propably the  main stuff) and php (imho better structured) bindings.
> >> >> There is one more issue - I don't know internals of these languages
> >> >> so it's very hard to understand what's smoke stuff and what's part of
> >> >> ruby/php.
> >> >>
> >> >> Is there any "minimal" (pseudocode) code to show how Smoke works?
> >> >> What to implement to do basic marshalling etc.
> >> >
> >> > Hi Petr,
> >> >
> >> > take a look at http://techbase.kde.org/Development/Languages/Smoke .
> >> > There's information about what smoke does and a minimal example in
> >> > C++. It should give you an idea how to use SMOKE. If it's still not
> >> > clear, feel free to ask :).
> >>
> >> I should note that when I first started working with it, that
> >> description wasn't as thorough as I would have liked. Luckily Chris
> >> Burel (of the perlqt4 project) wrote something nice which can be used
> >> as supplemental information:
> >>
> >> http://code.google.com/p/perlqt4/wiki/Smoke_API_documentation
> >>
> >> (It's on the perlqt4 wiki but not specific to Perl)
> >
> > Oh, that's cool. I haven't seen this before. We should contact Chris and
> > ask him if he/we can also put this on techbase.
> >
> > --
> > Arno Rehn
> > arno at arnorehn.de
> > _______________________________________________
> > Kde-bindings mailing list
> > Kde-bindings at kde.org
> > https://mail.kde.org/mailman/listinfo/kde-bindings
>
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings at kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings

-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list