1
0
Fork 0
cl-sites/guile.html_node/Programming-in-C.html

104 lines
5 KiB
HTML
Raw Normal View History

2024-12-17 12:49:28 +01:00
<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This manual documents Guile version 3.0.10.
Copyright (C) 1996-1997, 2000-2005, 2009-2023 Free Software Foundation,
Inc.
Copyright (C) 2021 Maxime Devos
Copyright (C) 2024 Tomas Volf
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License." -->
<title>Programming in C (Guile Reference Manual)</title>
<meta name="description" content="Programming in C (Guile Reference Manual)">
<meta name="keywords" content="Programming in C (Guile Reference Manual)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content=".texi2any-real">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="index.html" rel="start" title="Top">
<link href="Concept-Index.html" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="index.html" rel="up" title="Top">
<link href="API-Reference.html" rel="next" title="API Reference">
<link href="Programming-in-Scheme.html" rel="prev" title="Programming in Scheme">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
span:hover a.copiable-link {visibility: visible}
-->
</style>
<link rel="stylesheet" type="text/css" href="https://www.gnu.org/software/gnulib/manual.css">
</head>
<body lang="en">
<div class="chapter-level-extent" id="Programming-in-C">
<div class="nav-panel">
<p>
Next: <a href="API-Reference.html" accesskey="n" rel="next">API Reference</a>, Previous: <a href="Programming-in-Scheme.html" accesskey="p" rel="prev">Programming in Scheme</a>, Up: <a href="index.html" accesskey="u" rel="up">The Guile Reference Manual</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h2 class="chapter" id="Programming-in-C-1"><span>5 Programming in C<a class="copiable-link" href="#Programming-in-C-1"> &para;</a></span></h2>
<p>This part of the manual explains the general concepts that you need to
understand when interfacing to Guile from C. You will learn about how
the latent typing of Scheme is embedded into the static typing of C, how
the garbage collection of Guile is made available to C code, and how
continuations influence the control flow in a C program.
</p>
<p>This knowledge should make it straightforward to add new functions to
Guile that can be called from Scheme. Adding new data types is also
possible and is done by defining <em class="dfn">foreign objects</em>.
</p>
<p>The <a class="ref" href="Programming-Overview.html">An Overview of Guile Programming</a> section of this part contains general
musings and guidelines about programming with Guile. It explores
different ways to design a program around Guile, or how to embed Guile
into existing programs.
</p>
<p>For a pedagogical yet detailed explanation of how the data representation of
Guile is implemented, See <a class="xref" href="Data-Representation.html">Data Representation</a>. You don&rsquo;t need to know the
details given there to use Guile from C, but they are useful when you want to
modify Guile itself or when you are just curious about how it is all done.
</p>
<p>For detailed reference information on the variables, functions
etc. that make up Guile&rsquo;s application programming interface (API),
See <a class="xref" href="API-Reference.html">API Reference</a>.
</p>
<ul class="mini-toc">
<li><a href="Parallel-Installations.html" accesskey="1">Parallel Installations</a></li>
<li><a href="Linking-Programs-With-Guile.html" accesskey="2">Linking Programs With Guile</a></li>
<li><a href="Linking-Guile-with-Libraries.html" accesskey="3">Linking Guile with Libraries</a></li>
<li><a href="General-Libguile-Concepts.html" accesskey="4">General concepts for using libguile</a></li>
<li><a href="Defining-New-Foreign-Object-Types.html" accesskey="5">Defining New Foreign Object Types</a></li>
<li><a href="Function-Snarfing.html" accesskey="6">Function Snarfing</a></li>
<li><a href="Programming-Overview.html" accesskey="7">An Overview of Guile Programming</a></li>
<li><a href="Autoconf-Support.html" accesskey="8">Autoconf Support</a></li>
</ul>
</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="API-Reference.html">API Reference</a>, Previous: <a href="Programming-in-Scheme.html">Programming in Scheme</a>, Up: <a href="index.html">The Guile Reference Manual</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>