View previous topic :: View next topic |
Author |
Message |
Linker
Joined: 06 Nov 2006 Posts: 29 Location: Almaty, Kazakhstan
|
Posted: Mon Aug 20, 2007 11:04 am Post subject: Bindings for ZLib |
|
|
Hello.
Does anybody have zlib bindings?
I see ones in Phobos, but as I'm using tango, I'd have to port them, then maintain them, etc.
I wonder if anybody has already done that work? |
|
Back to top |
|
|
jcc7
Joined: 22 Feb 2004 Posts: 657 Location: Muskogee, OK, USA
|
Posted: Mon Aug 20, 2007 12:12 pm Post subject: Re: Bindings for ZLib |
|
|
Linker wrote: | Hello.
Does anybody have zlib bindings?
I see ones in Phobos, but as I'm using tango, I'd have to port them, then maintain them, etc.
I wonder if anybody has already done that work? | Have you heard of Tangobos? It's supposed to be a port of Phobos for Tango. It looks like std.zlib is there. |
|
Back to top |
|
|
Lutger
Joined: 25 May 2006 Posts: 91
|
Posted: Mon Aug 20, 2007 5:55 pm Post subject: |
|
|
The binding from phobos should work in Tango without any modification. (I mean the C library, not the wrapper). |
|
Back to top |
|
|
mwarning
Joined: 01 Apr 2007 Posts: 56
|
Posted: Tue Aug 21, 2007 4:19 pm Post subject: |
|
|
You can use the bindings from phobos;
You need to replace some function calls to the garbage collector.
For Tango, it's esay:
std.gc.hasNoPointers(destbuf.ptr);
-> tango.core.Memory.GC.removeRange(destbuf.ptr);
(^ I guess it's the right replacement) |
|
Back to top |
|
|
Linker
Joined: 06 Nov 2006 Posts: 29 Location: Almaty, Kazakhstan
|
Posted: Wed Aug 22, 2007 8:23 am Post subject: |
|
|
Thanks for your tips.
I guess I'll have to maintain my own bindings for zlib, as Tangobos doesn't seem like a good fit. |
|
Back to top |
|
|
|