mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpgscm: Use native string searching functions.
* tests/gpgscm/ffi-private.h: Handle character arguments. * tests/gpgscm/ffi.c (do_string_index): New function. (do_string_rindex): Likewise. (do_string_contains): Likewise. (ffi_init): Define new functions. * tests/gpgscm/ffi.scm (ffi-define): New macro. * tests/gpgscm/lib.scm (string-index): Use native function, demonstrate behavior. (string-rindex): Likewise. (string-contains?): Likewise. Demonstrate behavior of various other functions. (read-all): Rework so that it can handle large files. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
d99949fc8c
commit
5fbbc4b334
4 changed files with 117 additions and 42 deletions
|
@ -38,3 +38,7 @@
|
|||
(write (cons (string->symbol name) args) args')
|
||||
(throw (string-append
|
||||
(get-output-string args') ": " message))))
|
||||
|
||||
;; Pseudo-definitions for foreign functions. Evaluates to no code,
|
||||
;; but serves as documentation.
|
||||
(macro (ffi-define form))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue