|
| 1 | +;;; This file was automatically generated by SWIG (http://www.swig.org). |
| 2 | +;;; Version 3.0.12 |
| 3 | +;;; |
| 4 | +;;; Do not make changes to this file unless you know what you are doing--modify |
| 5 | +;;; the SWIG interface file instead. |
| 6 | + |
| 7 | +(in-package :lsquic) |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | +;;;SWIG wrapper code starts here |
| 12 | + |
| 13 | +(cl:defmacro defanonenum (cl:&body enums) |
| 14 | + "Converts anonymous enums to defconstants." |
| 15 | + `(cl:progn ,@(cl:loop for value in enums |
| 16 | + for index = 0 then (cl:1+ index) |
| 17 | + when (cl:listp value) do (cl:setf index (cl:second value) |
| 18 | + value (cl:first value)) |
| 19 | + collect `(cl:defconstant ,value ,index)))) |
| 20 | + |
| 21 | +(cl:eval-when (:compile-toplevel :load-toplevel) |
| 22 | + (cl:unless (cl:fboundp 'swig-lispify) |
| 23 | + (cl:defun swig-lispify (name flag cl:&optional (package cl:*package*)) |
| 24 | + (cl:labels ((helper (lst last rest cl:&aux (c (cl:car lst))) |
| 25 | + (cl:cond |
| 26 | + ((cl:null lst) |
| 27 | + rest) |
| 28 | + ((cl:upper-case-p c) |
| 29 | + (helper (cl:cdr lst) 'upper |
| 30 | + (cl:case last |
| 31 | + ((lower digit) (cl:list* c #\- rest)) |
| 32 | + (cl:t (cl:cons c rest))))) |
| 33 | + ((cl:lower-case-p c) |
| 34 | + (helper (cl:cdr lst) 'lower (cl:cons (cl:char-upcase c) rest))) |
| 35 | + ((cl:digit-char-p c) |
| 36 | + (helper (cl:cdr lst) 'digit |
| 37 | + (cl:case last |
| 38 | + ((upper lower) (cl:list* c #\- rest)) |
| 39 | + (cl:t (cl:cons c rest))))) |
| 40 | + ((cl:char-equal c #\_) |
| 41 | + (helper (cl:cdr lst) '_ (cl:cons #\- rest))) |
| 42 | + (cl:t |
| 43 | + (cl:error "Invalid character: ~A" c))))) |
| 44 | + (cl:let ((fix (cl:case flag |
| 45 | + ((constant enumvalue) "+") |
| 46 | + (variable "*") |
| 47 | + (cl:t "")))) |
| 48 | + (cl:intern |
| 49 | + (cl:concatenate |
| 50 | + 'cl:string |
| 51 | + fix |
| 52 | + (cl:nreverse (helper (cl:concatenate 'cl:list name) cl:nil cl:nil)) |
| 53 | + fix) |
| 54 | + package)))))) |
| 55 | + |
| 56 | +;;;SWIG wrapper code ends here |
| 57 | + |
| 58 | + |
| 59 | +(cffi:defcfun ("new_headers" #.(chomp-lsquic "new_headers" 'function)) :pointer |
| 60 | + (header_count :unsigned-int)) |
| 61 | + |
| 62 | +(cl:export '#.(chomp-lsquic "new_headers" 'function)) |
| 63 | + |
| 64 | +(cffi:defcfun ("add_header" #.(chomp-lsquic "add_header" 'function)) :void |
| 65 | + (name :string) |
| 66 | + (val :string)) |
| 67 | + |
| 68 | +(cl:export '#.(chomp-lsquic "add_header" 'function)) |
| 69 | + |
| 70 | +(cffi:defcfun ("view_header" #.(chomp-lsquic "view_header" 'function)) :void |
| 71 | + (hdr :pointer)) |
| 72 | + |
| 73 | +(cl:export '#.(chomp-lsquic "view_header" 'function)) |
| 74 | + |
| 75 | +(cffi:defcfun ("view_lsxpack_header" #.(chomp-lsquic "view_lsxpack_header" 'function)) :void |
| 76 | + (hdr :pointer)) |
| 77 | + |
| 78 | +(cl:export '#.(chomp-lsquic "view_lsxpack_header" 'function)) |
| 79 | + |
| 80 | + |
0 commit comments