1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00

more work on the d binding

This commit is contained in:
Marenz 2011-04-30 14:39:04 +02:00
parent 7a1b1f0e08
commit d94c76012a
2 changed files with 6 additions and 8 deletions

View file

@ -16,7 +16,9 @@
* etc...
*/
EPOCH = 1440444041 // 2015-08-24 21:20:41 CET (Monday)
module psyc.common;
const EPOCH = 1440444041; // 2015-08-24 21:20:41 CET (Monday)
extern (C):
@ -119,9 +121,6 @@ struct MatchVar
*/
String newString (char *str, size_t strlen);
#define C2STR(_string) {sizeof(_string)-1, _string}
#define C2ARG(_string) _string, sizeof(_string)-1
/* intermediate struct for a PSYC variable modification */
struct Modifier
{
@ -239,8 +238,7 @@ int matches(char *sho, size_t slen,
* number of bytes written. 0 is a legal return value. Should the
* callback return -1, text leaves the original template text as is.
*/
typedef int (*textCB)(char *match, size_t mlen,
char **buffer, size_t *blen);
alias extern (C) int function (char *match, size_t mlen, char **buffer, size_t *blen) textCB;
/**
* Fills out text templates by asking a callback for content.
@ -255,7 +253,7 @@ typedef int (*textCB)(char *match, size_t mlen,
*
* See also http://about..eu/text
*/
int text(char *template, size_t tlen,
int text(char *_template, size_t tlen,
char **buffer, size_t *blen,
textCB lookupValue,
char *braceOpen, char *braceClose);

View file

@ -1,6 +1,6 @@
module psyc.parser;
import psyc.psyc;
import psyc.common;
/**
* @file d/psyc/parser.d