Hi Marcus,
I generally check the arguments passed to C in C and the
arguments
returned in haXe. This way, if we know a value is incorrect
in C, we can
throw our own error, or use a default value.
Each of the C functions needs to be tested. I tested the
ones which are
already wrapped with haXe classes, but not the rest. As you
can see,
there's a lot to do, though in theory, it should all be okay
as the
MagickWand docs give the argument requirements. It's pretty
much only
simple grunt work left. If you like, I can start debugging
all of this
with you, though we'll have to wait til wednesday at the
earliest, as I
have a major deadline for a project this week.
I'm adding you to the nMagick repository now.
Regards,
Lee
Marcus Bergstrom wrote:
> Hey Lee,
>
> yeah I got it working finally. I was going through the
class methods
> and I noticed a few things that we need to talk about.
> Mainly out of bounds operations. I noticed some issues
in the Pixel
> class where all the percentage values range from
0-1.0.
> But if one use 14 or even 1 it will throw an obscure
error from C.
> (The debug information is poor.)
>
> So I was wondering, where do we check the arguments
that come in? In
> haxe or in C?
>
> What's your take on this?
>
> M.
>
> Ps. my email is mquickform gmail.com
<mailto:mquickform gmail.com>. Ds
>
>
-----------------------------------------------------------
> Marcus Bergstrom [marcus at quickform.net]
>
-----------------------------------------------------------
>
>
>
> On Feb 26, 2007, at 9:40 AM, Lee McColl Sylvester
wrote:
>
>> Oi! That's my code you're talking about there,
marcus Glad
you
>> got it going. Please send me your gmail address so
I can add you to
>> the SVN.
>>
>> Regards,
>> Lee
>>
>>
>>
>>
>> Marcus Bergstrom wrote:
>>> Thanks Dan, that did the trick. I used
val_number and dynamiclib and
>>> commented out a line in nMagick.c and it
compiled.
>>> I still haven't tried to see if the lib
actually works, but for now
>>> the size of
>>> the .ndll is 53K.
>>>
>>> I will do some test tonight (hopefully), and
then maybe I will be
>>> able to get
>>> going on finalizing the haxe code.
>>>
>>> M.
>>>
>>>
>>>
>>> On Feb 23, 2007, at 5:44 PM, daniel fischer
wrote:
>>>
>>>> Marcus Bergstrom <marcus quickform.net
>>>> <mailto:marcus quickform.net>> (on
Fri, 23 Feb 2007 16:46:04 +0100):
>>>>
>>>>> gcc -shared -lneko -lWand -lMagick -o
nMagick.ndll nMagick.o
>>>>> i686-apple-darwin8-gcc-4.0.1:
unrecognized option '-shared'
>>>>> /usr/bin/ld: Undefined symbols:
>>>>> _main
>>>>> _MagickThumbnail
>>>>> _val_double
>>>>> collect2: ld returned 1 exit status
>>>>>
>>>>> Anyone got a clue?
>>>>
>>>> maybe, try replacing "-shared"
with "-dynamiclib" in the command
>>>> line, that should get rid of the _main
symbol. (thanks apple)
>>>>
>>>> val_double doesn't exist in neko. try
val_float or val_number. the
>>>> compiler seems to take undefined symbols as
returning int, but the
>>>> linker then complains.
>>>>
>>>> about MagickThumbnail, i don't know. see if
it actually exists in
>>>> your imagemagick headers-- if not, just
remove it from nMagick for
>>>> now...
>>>>
>>>> -dan
>>>>
>>>>
>>>> --http://0xDF.com/
>>>> http://iterative.org/
>>>>
>>>> --Neko : One VM to run them all
>>>> (http://nekovm.org)
>>>
>>>
>>> --Neko : One VM to run them all
>>> (http://nekovm.org)
>>>
>>
>>
>> --
>> Neko : One VM to run them all
>> (http://nekovm.org)
>
--
Neko : One VM to run them all
(http://nekovm.org)
|