Skip to content
Snippets Groups Projects
Select Git revision
  • fe46a5d72f1a24d88f774c1bb1eb6e417d0e44b9
  • master default protected
  • 9.0
  • 8.0
  • nt-tools
  • 7.8
  • 7.6
  • 7.4
  • 7.2
  • 7.0
  • 0.6
  • rosuav/latex-markdown-renderer
  • rxnpatch/rxnpatch
  • marcus/gobject-introspection
  • rxnpatch/8.0
  • rosuav/pre-listening-ports
  • rosuav/async-annotations
  • rosuav/pgsql-ssl
  • rxnpatch/rxnpatch-broken/2023-10-06T094250
  • grubba/fdlib
  • grubba/wip/sakura/8.0
  • v8.0.2020
  • v8.0.2018
  • v8.0.2016
  • v8.0.2014
  • v8.0.2012
  • v8.0.2008
  • v8.0.2006
  • v8.0.2004
  • v8.0.2002
  • v8.0.2000
  • v8.0.1998
  • v8.0.1996
  • v8.0.1994
  • v8.0.1992
  • v8.0.1990
  • v8.0.1988
  • v8.0.1986
  • rxnpatch/clusters/8.0/2025-04-29T124414
  • rxnpatch/2025-04-29T124414
  • v8.0.1984
41 results

apply_low.h

Blame
  • apply_low.h 9.01 KiB
    /*
    || This file is part of Pike. For copyright information see COPYRIGHT.
    || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
    || for more information.
    */
    
        {
          struct program *p;
          struct reference *ref;
          struct pike_frame *new_frame;
          struct identifier *function;
    
    #if 0
          /* This kind of fault tolerance is braindamaged. /mast */
          if(fun<0)
          {
    	pop_n_elems(Pike_sp-save_sp);
    	push_undefined();
    	return 0;
          }
    #else
    #ifdef PIKE_DEBUG
          if (fun < 0)
    	Pike_fatal ("Invalid function offset: %d.\n", fun);
    #endif
    #endif
    
          check_stack(256);
          check_mark_stack(256);
    
    #ifdef PIKE_DEBUG
          {
    	static int counter;
    	switch(d_flag)
    	{
    	  case 0:
    	  case 1:
    	  case 2:
    	    break;
    	  case 3:
    	    if(!((counter++ & 7)))
    	      do_debug();
    	    break;
    	  case 4:
    	  default:
    	    do_debug();
    	}
          }
    #endif
    
          p=o->prog;
          if(!p)
    	PIKE_ERROR("destructed object->function",
    	      "Cannot call functions in destructed objects.\n", Pike_sp, args);
    
          if(!(p->flags & PROGRAM_PASS_1_DONE) || (p->flags & PROGRAM_AVOID_CHECK))
    	PIKE_ERROR("__empty_program() -> function",
    	      "Cannot call functions in unfinished objects.\n", Pike_sp, args);
    	
    
    #ifdef PIKE_SECURITY
          CHECK_DATA_SECURITY_OR_ERROR(o, SECURITY_BIT_CALL,
    				   ("Function call permission denied.\n"));
    
          if(!CHECK_DATA_SECURITY(o, SECURITY_BIT_NOT_SETUID))
    	SET_CURRENT_CREDS(o->prot);
    #endif
    
    
    #ifdef PIKE_DEBUG