gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] Segmentation fault with procedure called Init


From: Martin Kalbfuß
Subject: [Gm2] Segmentation fault with procedure called Init
Date: Fri, 06 Nov 2009 02:16:43 +0100

Hi,

I have a procedure called Init in a module. When I call any procedure
from that module I get a segmentation fault. When remove Init from the
definition module it works fine. Is Init a reserved word or something?

**********************************************************
DEFINITION MODULE SDL;

PROCEDURE Init(flags : CARDINAL) : INTEGER;
PROCEDURE another_proc(flags : CARDINAL) : INTEGER;
(*PROCEDURE InitSubSystem(flags : CARDINAL) : INTEGER;*)

(*PROCEDURE QuitSDL();*)

(*PROCEDURE QuitSubSystem(flags : CARDINAL);*)

END SDL.

**********************************************************
IMPLEMENTATION MODULE SDL;

IMPORT SDLBase;

PROCEDURE Init(flags : CARDINAL) : INTEGER;
BEGIN
     RETURN SDLBase.SDL_Init(flags);
END Init;

PROCEDURE another_proc(flags : CARDINAL) : INTEGER;
BEGIN
    RETURN SDLBase.SDL_Init(flags);
END another_proc;

(*
PROCEDURE InitSubSystem(flags : CARDINAL) : INTEGER;
BEGIN
     RETURN SDLBase.SDL_InitSubSystem(flags);
END InitSubSystem;

PROCEDURE QuitSDL();
BEGIN
     SDLBase.SDL_Quit();
END QuitSDL;

PROCEDURE QuitSubSystem(flags : CARDINAL);
BEGIN
     SDLBase.SDL_QuitSubSystem(flags);
END QuitSubSystem;
*)
END SDL.

**********************************************************
MODULE SDLtest;

IMPORT SDL;

VAR Err : INTEGER;

BEGIN
 Err := SDL.another_proc(0);
END SDLtest.

**********************************************************





reply via email to

[Prev in Thread] Current Thread [Next in Thread]