Server IP : 185.86.78.101 / Your IP : 216.73.216.124 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/share/swig4.0/guile/ |
Upload File : |
;;;************************************************************************ ;;;*common.scm ;;;* ;;;* This file contains generic SWIG GOOPS classes for generated ;;;* GOOPS file support ;;;************************************************************************ (define-module (Swig swigrun)) (define-module (Swig common) #:use-module (oop goops) #:use-module (Swig swigrun)) (define-class <swig-metaclass> (<class>) (new-function #:init-value #f)) (define-method (initialize (class <swig-metaclass>) initargs) (slot-set! class 'new-function (get-keyword #:new-function initargs #f)) (next-method)) (define-class <swig> () (swig-smob #:init-value #f) #:metaclass <swig-metaclass> ) (define-method (initialize (obj <swig>) initargs) (next-method) (slot-set! obj 'swig-smob (let ((arg (get-keyword #:init-smob initargs #f))) (if arg arg (let ((ret (apply (slot-ref (class-of obj) 'new-function) (get-keyword #:args initargs '())))) ;; if the class is registered with runtime environment, ;; new-Function will return a <swig> goops class. In that case, extract the smob ;; from that goops class and set it as the current smob. (if (slot-exists? ret 'swig-smob) (slot-ref ret 'swig-smob) ret)))))) (define (display-address o file) (display (number->string (object-address o) 16) file)) (define (display-pointer-address o file) ;; Don't fail if the function SWIG-PointerAddress is not present. (let ((address (false-if-exception (SWIG-PointerAddress o)))) (if address (begin (display " @ " file) (display (number->string address 16) file))))) (define-method (write (o <swig>) file) ;; We display _two_ addresses to show the object's identity: ;; * first the address of the GOOPS proxy object, ;; * second the pointer address. ;; The reason is that proxy objects are created and discarded on the ;; fly, so different proxy objects for the same C object will appear. (let ((class (class-of o))) (if (slot-bound? class 'name) (begin (display "#<" file) (display (class-name class) file) (display #\space file) (display-address o file) (display-pointer-address o file) (display ">" file)) (next-method)))) (export <swig-metaclass> <swig>) ;;; common.scm ends here