Skip to content

Commit

Permalink
kernel: add new header gap_all.h
Browse files Browse the repository at this point in the history
So far, most package kernel extensions `#include "compiled.h"` in order
to conveniently get access to (almost) all source headers of GAP at once
(which is nice for us because it means we are free to rename headers or
move stuff around between them without breaking kernel extensions).

But the result is rather counterintuitive: if one is not familiar with
this, seeing `#include "compiled.h"` in code is not at all clear. Also,
the original of `compiled.h` was to be included by C code generated by
`gac`, and it contains stuff we'd rather not encourage others to use.

Thus, add a new header `gap_all.h` containing all `#include` statements
formerly found in `compiled.h` -- this resolves all concerns.
  • Loading branch information
fingolfin committed Nov 14, 2019
1 parent 85588b0 commit 130dd7a
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 74 deletions.
68 changes: 2 additions & 66 deletions src/compiled.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,71 +18,7 @@
extern "C" {
#endif

#include "ariths.h"
#include "blister.h"
#include "bool.h"
#include "calls.h"
#include "code.h"
#include "collectors.h"
#include "compiler.h"
#include "compstat.h"
#include "costab.h"
#include "cyclotom.h"
#include "dt.h"
#include "dteval.h"
#include "error.h"
#include "exprs.h"
#include "finfield.h"
#include "funcs.h"
#include "gap.h"
#include "gapstate.h"
#include "gasman.h"
#include "gvars.h"
#include "info.h"
#include "integer.h"
#include "intrprtr.h"
#include "io.h"
#include "iostream.h"
#include "listfunc.h"
#include "listoper.h"
#include "lists.h"
#include "macfloat.h"
#include "modules.h"
#include "objcftl.h"
#include "objects.h"
#include "objfgelm.h"
#include "objpcgel.h"
#include "opers.h"
#include "permutat.h"
#include "plist.h"
#include "pperm.h"
#include "precord.h"
#include "range.h"
#include "rational.h"
#include "read.h"
#include "records.h"
#include "saveload.h"
#include "scanner.h"
#include "sctable.h"
#include "set.h"
#include "stats.h"
#include "streams.h"
#include "stringobj.h"
#include "sysfiles.h"
#include "system.h"
#include "tietze.h"
#include "trans.h"
#include "vars.h"
#include "vector.h"
#include "weakptr.h"

#ifdef HPCGAP
#include "hpc/aobjects.h"
#include "hpc/guards.h"
#include "hpc/serialize.h"
#include "hpc/threadapi.h"
#include "hpc/traverse.h"
#endif
#include "gap_all.h"

extern Obj InfoDecision;

Expand Down Expand Up @@ -237,5 +173,5 @@ void C_SET_LIMB8(Obj bag, UInt limbnumber, UInt8 value);
#ifdef __cplusplus
} // extern "C"
#endif

#endif // GAP_COMPILED_H
91 changes: 91 additions & 0 deletions src/gap_all.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/****************************************************************************
**
** This file is part of GAP, a system for computational discrete algebra.
**
** Copyright of GAP belongs to its developers, whose names are too numerous
** to list here. Please refer to the COPYRIGHT file for details.
**
** SPDX-License-Identifier: GPL-2.0-or-later
**
** This header includes most of the other GAP headers, and is meant to be
** included by GAP kernel extensions.
*/

#ifndef GAP_ALL_H
#define GAP_ALL_H

#ifdef __cplusplus
extern "C" {
#endif

#include "ariths.h"
#include "blister.h"
#include "bool.h"
#include "calls.h"
#include "code.h"
#include "collectors.h"
#include "compiler.h"
#include "compstat.h"
#include "costab.h"
#include "cyclotom.h"
#include "dt.h"
#include "dteval.h"
#include "error.h"
#include "exprs.h"
#include "finfield.h"
#include "funcs.h"
#include "gap.h"
#include "gapstate.h"
#include "gasman.h"
#include "gvars.h"
#include "info.h"
#include "integer.h"
#include "intrprtr.h"
#include "io.h"
#include "iostream.h"
#include "listfunc.h"
#include "listoper.h"
#include "lists.h"
#include "macfloat.h"
#include "modules.h"
#include "objcftl.h"
#include "objects.h"
#include "objfgelm.h"
#include "objpcgel.h"
#include "opers.h"
#include "permutat.h"
#include "plist.h"
#include "pperm.h"
#include "precord.h"
#include "range.h"
#include "rational.h"
#include "read.h"
#include "records.h"
#include "saveload.h"
#include "scanner.h"
#include "sctable.h"
#include "set.h"
#include "stats.h"
#include "streams.h"
#include "stringobj.h"
#include "sysfiles.h"
#include "system.h"
#include "tietze.h"
#include "trans.h"
#include "vars.h"
#include "vector.h"
#include "weakptr.h"

#ifdef HPCGAP
#include "hpc/aobjects.h"
#include "hpc/guards.h"
#include "hpc/serialize.h"
#include "hpc/threadapi.h"
#include "hpc/traverse.h"
#endif

#ifdef __cplusplus
} // extern "C"
#endif

#endif // GAP_ALL_H
9 changes: 1 addition & 8 deletions src/modules_builtin.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include "modules_builtin.h"

#include "compiled.h"
#include "gap_all.h"
#include "gap.h"
#include "hookintrprtr.h"
#include "info.h"
Expand All @@ -25,13 +25,6 @@
#include "vecffe.h"
#include "vecgf2.h"

#ifdef HPCGAP
#include "hpc/aobjects.h"
#include "hpc/serialize.h"
#include "hpc/threadapi.h"
#include "hpc/traverse.h"
#endif

/****************************************************************************
**
*V InitFuncsBuiltinModules . . . . . list of builtin modules init functions
Expand Down

0 comments on commit 130dd7a

Please sign in to comment.