;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; LUSH Lisp Universal Shell
;;;   Copyright (C) 2002 Leon Bottou, Yann Le Cun, AT&T Corp, NECI.
;;; Includes parts of TL3:
;;;   Copyright (C) 1987-1999 Leon Bottou and Neuristique.
;;; Includes selected parts of SN3.2:
;;;   Copyright (C) 1991-2001 AT&T Corp.
;;;
;;; Includes information derived from the GSL (Gnu Scientific Library)
;;;   header files which are copyrighted and distributed under the GPL
;;;   by their respective authors.
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 2 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(libload "python/python-config")


#? *** pyrun

;; dummy function that adds Python C header files in C file
(eval `(de dummy_pyrun () ,python-cpheader-cmd ()))

#? * (dummy_pyrun)
#? * (pyrun_anyfile <o1> <om>)
#? * (pyrun_anyfileex <o1> <o2> <im>)
#? * (pyrun_anyfileflags <o1> <o2> <om>)
#? * (pyrun_anyfileexflags <o1> <o2> <s> <om>)
#? * (pyrun_simplestring <om>)
#? * (pyrun_simplestringflags <o1> <om>)
#? * (pyrun_simplefile <o1> <om>)
#? * (pyrun_simplefileex <o1> <o2> <im>)
#? * (pyrun_simplefileexflags <o1> <o2> <s> <om>)
#? * (pyrun_interactiveone <o1> <om>)
#? * (pyrun_interactiveoneflags <o1> <o2> <om>)
#? * (pyrun_interactiveloop <o1> <om>)
#? * (pyrun_interactiveloopflags <o1> <o2> <om>)
#? * (pyrun_string <o1> <s> <o2> <om>)
#? * (pyrun_file <o1> <o2> <s> <p> <om>)
#? * (pyrun_fileex <o1> <o2> <s> <p> <m> <im>)
#? * (pyrun_stringflags <o1> <s> <o2> <p> <om>)
#? * (pyrun_fileflags <o1> <o2> <s> <p> <m> <om>)
#? * (pyrun_fileexflags <o1> <o2> <s> <p> <n> <m> <om>)

;; ********************************************************


(de PyRun_AnyFile ( o1  om )
    ((-gptr-"FILE *") o1)  
    ((-str-) om)   
    (int  #{  PyRun_AnyFile( $o1   ,$om->data )  #} ))

(de PyRun_AnyFileEx ( o1  o2  im )
    ((-gptr-"FILE *") o1)  
    ((-str-) o2)  
    ((-int-) im)   
    (int  #{  PyRun_AnyFileEx( $o1   ,$o2->data   ,$im )  #} ))

(de PyRun_AnyFileFlags ( o1  o2  om )
    ((-gptr-"FILE *") o1)  
    ((-str-) o2)  
    ((-gptr-"PyCompilerFlags *") om)   
    (int  #{  PyRun_AnyFileFlags( $o1   ,$o2->data   ,$om )  #} ))

(de PyRun_AnyFileExFlags ( o1  o2  s  om )
    ((-gptr-"FILE *") o1)  
    ((-str-) o2)  
    ((-int-) s)  
    ((-gptr-"PyCompilerFlags *") om)   
    (int  #{  PyRun_AnyFileExFlags( $o1   ,$o2->data   ,$s   ,$om )  #} ))

(de PyRun_SimpleString ( om )
    ((-str-) om)   
    (int  #{  PyRun_SimpleString( $om->data )  #} ))

(de PyRun_SimpleStringFlags ( o1  om )
    ((-str-) o1)  
    ((-gptr-"PyCompilerFlags *") om)   
    (int  #{  PyRun_SimpleStringFlags( $o1->data   ,$om )  #} ))

(de PyRun_SimpleFile ( o1  om )
    ((-gptr-"FILE *") o1)  
    ((-str-) om)   
    (int  #{  PyRun_SimpleFile( $o1   ,$om->data )  #} ))

(de PyRun_SimpleFileEx ( o1  o2  im )
    ((-gptr-"FILE *") o1)  
    ((-str-) o2)  
    ((-int-) im)   
    (int  #{  PyRun_SimpleFileEx( $o1   ,$o2->data   ,$im )  #} ))

(de PyRun_SimpleFileExFlags ( o1  o2  s  om )
    ((-gptr-"FILE *") o1)  
    ((-str-) o2)  
    ((-int-) s)  
    ((-gptr-"PyCompilerFlags *") om)   
    (int  #{  PyRun_SimpleFileExFlags( $o1   ,$o2->data   ,$s   ,$om )  #} ))

(de PyRun_InteractiveOne ( o1  om )
    ((-gptr-"FILE *") o1)  
    ((-str-) om)   
    (int  #{  PyRun_InteractiveOne( $o1   ,$om->data )  #} ))

(de PyRun_InteractiveOneFlags ( o1  o2  om )
    ((-gptr-"FILE *") o1)  
    ((-str-) o2)  
    ((-gptr-"PyCompilerFlags *") om)   
    (int  #{  PyRun_InteractiveOneFlags( $o1   ,$o2->data   ,$om )  #} ))

(de PyRun_InteractiveLoop ( o1  om )
    ((-gptr-"FILE *") o1)  
    ((-str-) om)   
    (int  #{  PyRun_InteractiveLoop( $o1   ,$om->data )  #} ))

(de PyRun_InteractiveLoopFlags ( o1  o2  om )
    ((-gptr-"FILE *") o1)  
    ((-str-) o2)  
    ((-gptr-"PyCompilerFlags *") om)   
    (int  #{  PyRun_InteractiveLoopFlags( $o1   ,$o2->data   ,$om )  #} ))

(de PyRun_String ( o1  s  o2  om )
    ((-str-) o1)  
    ((-int-) s)  
    ((-gptr-"PyObject *") o2)  
    ((-gptr-"PyObject *") om)   
    (gptr  #{  PyRun_String( $o1->data   ,$s   ,$o2   ,$om )  #} ))        ;; PyObject * -> gptr

(de PyRun_File ( o1  o2  s  p  om )
    ((-gptr-"FILE *") o1)  
    ((-str-) o2)  
    ((-int-) s)  
    ((-gptr-"PyObject *") p)  
    ((-gptr-"PyObject *") om)   
    (gptr  #{  PyRun_File( $o1   ,$o2->data   ,$s   ,$p   ,$om )  #} ))        ;; PyObject * -> gptr

(de PyRun_FileEx ( o1  o2  s  p  m  im )
    ((-gptr-"FILE *") o1)  
    ((-str-) o2)  
    ((-int-) s)  
    ((-gptr-"PyObject *") p)  
    ((-gptr-"PyObject *") m)  
    ((-int-) im)   
    (gptr  #{  PyRun_FileEx( $o1   ,$o2->data   ,$s   ,$p   ,$m   ,$im )  #} ))        ;; PyObject * -> gptr

(de PyRun_StringFlags ( o1  s  o2  p  om )
    ((-str-) o1)  
    ((-int-) s)  
    ((-gptr-"PyObject *") o2)  
    ((-gptr-"PyObject *") p)  
    ((-gptr-"PyCompilerFlags *") om)   
    (gptr  #{  PyRun_StringFlags( $o1->data   ,$s   ,$o2   ,$p   ,$om )  #} ))        ;; PyObject * -> gptr

(de PyRun_FileFlags ( o1  o2  s  p  m  om )
    ((-gptr-"FILE *") o1)  
    ((-str-) o2)  
    ((-int-) s)  
    ((-gptr-"PyObject *") p)  
    ((-gptr-"PyObject *") m)  
    ((-gptr-"PyCompilerFlags *") om)   
    (gptr  #{  PyRun_FileFlags( $o1   ,$o2->data   ,$s   ,$p   ,$m   ,$om )  #} ))        ;; PyObject * -> gptr

(de PyRun_FileExFlags ( o1  o2  s  p  n  m  om )
    ((-gptr-"FILE *") o1)  
    ((-str-) o2)  
    ((-int-) s)  
    ((-gptr-"PyObject *") p)  
    ((-gptr-"PyObject *") n)  
    ((-int-) m)  
    ((-gptr-"PyCompilerFlags *") om)   
    (gptr  #{  PyRun_FileExFlags( $o1   ,$o2->data   ,$s   ,$p   ,$n   ,$m   ,$om )  #} ))        ;; PyObject * -> gptr


()
;; ********************************************************

(dhc-make () 
  dummy_pyrun
  pyrun_anyfile
  pyrun_anyfileex
  pyrun_anyfileflags
  pyrun_anyfileexflags
  pyrun_simplestring
  pyrun_simplestringflags
  pyrun_simplefile
  pyrun_simplefileex
  pyrun_simplefileexflags
  pyrun_interactiveone
  pyrun_interactiveoneflags
  pyrun_interactiveloop
  pyrun_interactiveloopflags
  pyrun_string
  pyrun_file
  pyrun_fileex
  pyrun_stringflags
  pyrun_fileflags
  pyrun_fileexflags
)
