Skip to main content

A sphinx autodoc extension for c modules

Project description

Build Status Coverage Code Style Documentation Status

A basic attempt at extending Sphinx and autodoc to work with C files.

The idea is to add support for similar directives that autodoc provides. i.e.

A function in my_c_file.c:

/**
 * A simple function that adds.
 *
 * @param a: The initial value
 * @param b: The value to add to `a`
 *
 * @returns The sum of `a` and `b`.
 *
 *
int my_adding_function(int a, int b) {
    return a + b;
    }

Could be referenced in documentation as:

.. autocfunction:: my_c_file.c::my_adding_function

With the resulting documentation output of:

.. c:function:: int my_adding_function(int a, int b)

A simple function that adds.

:param a: The initial value
:param b: The value to add to `a`
:returns: The sum of `a` and `b`

Requires

Similar Tools

  • hawkmoth a sphinx extension that which will document all of a C file. It supports being able to regex list files and have those files be documented.

  • breathe A doxygen output to sphinx tool.

Full Documentation

The complete documentation can be found at https://sphinx-c-autodoc.readthedocs.io/en/latest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx-c-autodoc-0.4.0.tar.gz (30.7 kB view hashes)

Uploaded Source

Built Distribution

sphinx_c_autodoc-0.4.0-py3-none-any.whl (34.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page