Re: SQLite 3.6.23.1 wrapper + connector

2010-07-22 Thread Pelle
On 07/20/2010 02:23 PM, awishformore wrote: When thinking about it, it makes sense to have string literals null terminated in order to have C functions work with them. However, I wonder about some stuff, for instance: string s = string; // is s == string\0 now? No, but the byte after the

Re: SQLite 3.6.23.1 wrapper + connector

2010-07-21 Thread Jesse Phillips
awishformore Wrote: You could then even go as far as not iduping, but instead casting it to a string to avoid unnecessary allocations. In D2 you would use std.contracts.assumeUnique() for this. http://digitalmars.com/d/2.0/phobos/std_contracts.html#assumeUnique

Re: SQLite 3.6.23.1 wrapper + connector

2010-07-21 Thread Jesse Phillips
Johannes Pfau Wrote: I always thought just casting to the pointer type isn't really safe. I guess you should use std.strings toStringz. (Off topic: std.strings toStringz uses the GC to store the c string. Now if I passed the returned pointer to a C function, but didn't store a reference in

Re: SQLite 3.6.23.1 wrapper + connector

2010-07-20 Thread Charles Hixson
On 07/18/2010 03:57 PM, dsimcha wrote: == Quote from awishformore (awishform...@gmail.com)'s article Hello there. I've converted the .h file of the latest SQLite version to .d and I thought I'd let the world know (as suggested on IRC ;). Maybe it will save someone some work. ... for me. Don't

Re: SQLite 3.6.23.1 wrapper + connector

2010-07-20 Thread awishformore
Am 20.07.2010 08:56, schrieb Rory McGuire: On Tue, 20 Jul 2010 01:37:10 +0200, awishformore awishform...@gmail.com wrote: Am 19.07.2010 21:34, schrieb Rory McGuire: On Mon, 19 Jul 2010 20:39:35 +0200, awishformore awishform...@gmail.com wrote: Am 19.07.2010 17:50, schrieb Johannes Pfau: On

Re: SQLite 3.6.23.1 wrapper + connector

2010-07-20 Thread Rory McGuire
On Tue, 20 Jul 2010 14:23:07 +0200, awishformore awishform...@gmail.com wrote: Am 20.07.2010 08:56, schrieb Rory McGuire: On Tue, 20 Jul 2010 01:37:10 +0200, awishformore awishform...@gmail.com wrote: Am 19.07.2010 21:34, schrieb Rory McGuire: On Mon, 19 Jul 2010 20:39:35 +0200,

Re: SQLite 3.6.23.1 wrapper + connector

2010-07-19 Thread Ellery Newcomer
On 07/18/2010 11:20 PM, awishformore wrote: I think an empty array/string is safer to return than null. It doesn't matter. D treats 'null' arrays exactly the same as empty arrays. Just think of a 'null' array as {length=0, ptr=null}

Re: SQLite 3.6.23.1 wrapper + connector

2010-07-19 Thread Johannes Pfau
On 19.07.2010 00:44, awishformore wrote: Hello there. I've converted the .h file of the latest SQLite version to .d and I thought I'd let the world know (as suggested on IRC ;). Maybe it will save someone some work. I've also written a nice connector class that wraps all the C functions

Re: SQLite 3.6.23.1 wrapper + connector

2010-07-19 Thread awishformore
Am 19.07.2010 17:50, schrieb Johannes Pfau: On 19.07.2010 00:44, awishformore wrote: Hello there. I've converted the .h file of the latest SQLite version to .d and I thought I'd let the world know (as suggested on IRC ;). Maybe it will save someone some work. I've also written a nice

Re: SQLite 3.6.23.1 wrapper + connector

2010-07-19 Thread Rory McGuire
On Mon, 19 Jul 2010 20:39:35 +0200, awishformore awishform...@gmail.com wrote: Am 19.07.2010 17:50, schrieb Johannes Pfau: On 19.07.2010 00:44, awishformore wrote: Hello there. I've converted the .h file of the latest SQLite version to .d and I thought I'd let the world know (as suggested

Re: SQLite 3.6.23.1 wrapper + connector

2010-07-19 Thread awishformore
Am 19.07.2010 21:34, schrieb Rory McGuire: On Mon, 19 Jul 2010 20:39:35 +0200, awishformore awishform...@gmail.com wrote: Am 19.07.2010 17:50, schrieb Johannes Pfau: On 19.07.2010 00:44, awishformore wrote: Hello there. I've converted the .h file of the latest SQLite version to .d and I

SQLite 3.6.23.1 wrapper + connector

2010-07-18 Thread awishformore
Hello there. I've converted the .h file of the latest SQLite version to .d and I thought I'd let the world know (as suggested on IRC ;). Maybe it will save someone some work. I've also written a nice connector class that wraps all the C functions for convenient use in your application. It's

Re: SQLite 3.6.23.1 wrapper + connector

2010-07-18 Thread dsimcha
== Quote from awishformore (awishform...@gmail.com)'s article Hello there. I've converted the .h file of the latest SQLite version to .d and I thought I'd let the world know (as suggested on IRC ;). Maybe it will save someone some work. I've also written a nice connector class that wraps all

Re: SQLite 3.6.23.1 wrapper + connector

2010-07-18 Thread BLS
On 19/07/2010 00:57, dsimcha wrote: Given that sqlite is in the public domain, maybe Phobos should eventually include SQLite + a nice D-ish wrapper for it, so that people can use it w/o creating dependency hell in their projects. Agreed, even a very popular and commercial multi OS RAD Tool

Re: SQLite 3.6.23.1 wrapper + connector

2010-07-18 Thread awishformore
On 19/07/2010 00:57, dsimcha wrote: == Quote from awishformore (awishform...@gmail.com)'s article Hello there. I've converted the .h file of the latest SQLite version to .d and I thought I'd let the world know (as suggested on IRC ;). Maybe it will save someone some work. I've also written a

Re: SQLite 3.6.23.1 wrapper + connector

2010-07-18 Thread Ellery Newcomer
On 07/18/2010 06:22 PM, BLS wrote: On 19/07/2010 00:57, dsimcha wrote: Given that sqlite is in the public domain, maybe Phobos should eventually include SQLite + a nice D-ish wrapper for it, so that people can use it w/o creating dependency hell in their projects. Agreed, even a very popular

Re: SQLite 3.6.23.1 wrapper + connector

2010-07-18 Thread Ellery Newcomer
On 07/18/2010 05:44 PM, awishformore wrote: Hello there. I've converted the .h file of the latest SQLite version to .d and I thought I'd let the world know (as suggested on IRC ;). Maybe it will save someone some work. I've also written a nice connector class that wraps all the C functions for

Re: SQLite 3.6.23.1 wrapper + connector

2010-07-18 Thread Jonathan M Davis
On Sunday 18 July 2010 19:10:35 Ellery Newcomer wrote: On 07/18/2010 05:44 PM, awishformore wrote: Hello there. I've converted the .h file of the latest SQLite version to .d and I thought I'd let the world know (as suggested on IRC ;). Maybe it will save someone some work. I've

Re: SQLite 3.6.23.1 wrapper + connector

2010-07-18 Thread Ellery Newcomer
On 07/18/2010 09:20 PM, Jonathan M Davis wrote: On Sunday 18 July 2010 19:10:35 Ellery Newcomer wrote: btw, would it be possible to distribute as something other than a rar? I wanted to have a peek at what you've done, but apparently nothing on my [linux] system can read that file. While I

Re: SQLite 3.6.23.1 wrapper + connector

2010-07-18 Thread awishformore
On 19/07/2010 04:59, Ellery Newcomer wrote: On 07/18/2010 09:20 PM, Jonathan M Davis wrote: On Sunday 18 July 2010 19:10:35 Ellery Newcomer wrote: btw, would it be possible to distribute as something other than a rar? I wanted to have a peek at what you've done, but apparently nothing on my