Commit Graph

2 Commits

Author SHA1 Message Date
Fergus Henderson
47a19fda80 Fix a bug: the `pragma c_code' declaration did not specify
Estimated hours taken: 2

tests/hard_coded/export.m:
	Fix a bug: the `pragma c_code' declaration did not specify
	`may_call_mercury' even though the C code actually did call Mercury.
	This caused it to break when compiled with `-O1' in grade `jump'.
1997-09-11 02:11:56 +00:00
David Jeffery
a2c42a51af Change the place in which the "#include" for a module's ".h" file is placed
Estimated hours taken: 2

Change the place in which the "#include" for a module's ".h" file is placed
when a procedure has been exported. Previously, the #include appeared just
before the definitions of the C functions for the exports. This change puts
the include at the top of the generated C file.

This has the consequence that the exported function can be used from
pragma c_code declarations without explicitly including the .h file.

tests/hard_coded/export_test.*:
        A test for this bug fix.
1997-07-29 01:05:10 +00:00