search for: const_string

Displaying 10 results from an estimated 10 matches for "const_string".

2008 May 10
0
[LLVMdev] Python bindings available.
...nt.struct(consts, packed) -- a struct, consts is a list of > other constants, packed is boolean I did this in Ocaml initially, but found the boolean constants pretty confusing to read in code. I kept asking “What's that random true doing there?” Therefore, the bindings expose these as const_string/ const_stringz and const_struct/const_packed_struct respectively. I figure the user can always write her own in the (very) rare cases that it is necessary to conditionalize such things: let const_string_maybez nullterm = if nullterm then const_stringz else const_string > Memor...
2009 Apr 03
2
Implementation of editheaders in dovecot
...message_get_header_size(stream, &hdr_size, NULL); i_stream_seek(stream, hdr_size.physical_size); stream = i_stream_create_limit(stream, body_size.physical_size); i_stream_unref(&tmp); return stream; } inline static struct istream * header_filter(struct istream * stream, ARRAY_TYPE(const_string) * headers_arr, unsigned int count) { const char * const * headers = NULL; DPRINTF("Func `%s' called", __FUNCTION__); if (count) { headers = (const char **)array_idx(headers_arr, 0); } return i_stream_create_header_filter(stream, HEADER_FILTER_EXCLUDE...
2008 May 10
4
[LLVMdev] Python bindings available.
Hi all, I'd like to announce the availability of Python bindings for LLVM. It is built over llvm-c, and currently exposes enough APIs to build an in-memory IR (and dump it!). It needs LLVM 2.3 latest and Python 2.5 (2.4 should be sufficient, but I haven't tested). Tested only on Linux/i386. Would love to hear your comments. [Needless to say, it's all work in progress, but mostly it
2007 Nov 25
5
[LLVMdev] OCaml
...:) Wow, this is just great! I had to tweak your example to get it to compile. Some of the function names and signatures have changed (I'm using CVS LLVM) so I've updated them and just thrown away the booleans you were passing (no idea what they were for but it works ;-). Also, I think const_string maybe should null terminate the given string so I changed your example to pass it a null terminated string instead (nasty hack). My code is: open Printf open Llvm let main filename = let m = create_module filename in (* @greeting = global [14 x i8] c"Hello, world!\00" *) le...
2007 Nov 25
1
[LLVMdev] OCaml bindings
...d forgotten about those changes or I would've updated it for you. The booleans in particular were used for null-terminating strings and creating varargs function types, among others, but weren't self-documenting, so I introduced variant names instead. For instance: > Also, I think const_string maybe should null terminate the given > string so I changed your example to pass it a null terminated string > instead (nasty hack). const_stringz null-terminates the string. But adding \000 in the literal as you did is equivalent. > My code is: > > [...] > > To use it...
2007 Nov 25
0
[LLVMdev] OCaml
Jon, On 2007-11-24, at 21:58, Jon Harrop wrote: > I just took another look at the LLVM project and it has come along > in leaps and bounds since I last looked. I've been working through > the (awesome!) tutorial and am now really hyped about the project. Excellent! > I am particularly interested in using LLVM to write compilers for > OCaml-like languages in OCaml-like
2008 May 11
2
[LLVMdev] Python bindings available.
...truct, consts is a list of > > other constants, packed is boolean > > I did this in Ocaml initially, but found the boolean constants pretty > confusing to read in code. I kept asking "What's that random true > doing there?" Therefore, the bindings expose these as const_string/ > const_stringz and const_struct/const_packed_struct respectively. I OK, will do. > :) Type handles in particular are very important. You can't form a > recursive type without using them, so you can't build any sort of data > structure. On it already. BTW, where can I fi...
2007 Nov 25
9
[LLVMdev] OCaml
Hi! I just took another look at the LLVM project and it has come along in leaps and bounds since I last looked. I've been working through the (awesome!) tutorial and am now really hyped about the project. I am particularly interested in using LLVM to write compilers for OCaml-like languages in OCaml-like languages. This requires some core functionality that would be generically useful:
2007 Nov 25
0
[LLVMdev] OCaml bindings
...those changes or I would've updated it > for you. The booleans in particular were used for null-terminating > strings and creating varargs function types, among others, but weren't > > self-documenting, so I introduced variant names instead. For instance: > > Also, I think const_string maybe should null terminate the given > > string so I changed your example to pass it a null terminated string > > instead (nasty hack). > > const_stringz null-terminates the string. But adding \000 in the > literal as you did is equivalent. Great. > > My code is: >...
2015 Oct 06
4
More information about - Dovecot 2.2.x quota mysql and dict
...t_transaction_context *_ctx, const char *key) { struct sql_dict_transaction_context *ctx = (struct sql_dict_transaction_context *)_ctx; struct sql_dict *dict = (struct sql_dict *)_ctx->dict; const struct dict_sql_map *map; ARRAY_TYPE(const_string) values; if (ctx->prev_inc_map != NULL) sql_dict_prev_inc_flush(ctx); map = sql_dict_find_map(dict, key, &values); if (map == NULL) { i_error("sql dict unset: Invalid/unmapped key: %s", key); ctx->failed = TRUE;...