Skip to content

NFC: Move #includes out of extern "C" block #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/include/cmark-gfm-extension_api.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#ifndef CMARK_GFM_EXTENSION_API_H
#define CMARK_GFM_EXTENSION_API_H

#ifdef __cplusplus
extern "C" {
#endif

#include "cmark-gfm.h"

#include <stdbool.h>

#ifdef __cplusplus
extern "C" {
#endif

struct cmark_renderer;
struct cmark_html_renderer;
struct cmark_chunk;
Expand Down
4 changes: 2 additions & 2 deletions src/include/cmark_ctype.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#ifndef CMARK_CMARK_CTYPE_H
#define CMARK_CMARK_CTYPE_H

#include "export.h"

#ifdef __cplusplus
extern "C" {
#endif

#include "export.h"

/** Locale-independent versions of functions from ctype.h.
* We want cmark to behave the same no matter what the system locale.
*/
Expand Down
8 changes: 4 additions & 4 deletions src/include/houdini.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#ifndef CMARK_HOUDINI_H
#define CMARK_HOUDINI_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>

#include "buffer.h"

#ifdef __cplusplus
extern "C" {
#endif

#ifdef HOUDINI_USE_LOCALE
#define _isxdigit(c) isxdigit(c)
#define _isdigit(c) isdigit(c)
Expand Down
8 changes: 4 additions & 4 deletions src/include/inlines.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#ifndef CMARK_INLINES_H
#define CMARK_INLINES_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdbool.h>
#include <stdlib.h>

#include "references.h"

#ifdef __cplusplus
extern "C" {
#endif

cmark_chunk cmark_clean_url(cmark_mem *mem, cmark_chunk *url);
cmark_chunk cmark_clean_title(cmark_mem *mem, cmark_chunk *title);
cmark_chunk cmark_clean_attributes(cmark_mem *mem, cmark_chunk *attributes);
Expand Down
4 changes: 2 additions & 2 deletions src/include/iterator.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#ifndef CMARK_ITERATOR_H
#define CMARK_ITERATOR_H

#include "cmark-gfm.h"

#ifdef __cplusplus
extern "C" {
#endif

#include "cmark-gfm.h"

typedef struct {
cmark_event_type ev_type;
cmark_node *node;
Expand Down
8 changes: 4 additions & 4 deletions src/include/node.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#ifndef CMARK_NODE_H
#define CMARK_NODE_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
Expand All @@ -14,6 +10,10 @@ extern "C" {
#include "buffer.h"
#include "chunk.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct {
cmark_list_type list_type;
int marker_offset;
Expand Down
6 changes: 3 additions & 3 deletions src/include/plugin.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#ifndef CMARK_PLUGIN_H
#define CMARK_PLUGIN_H

#include "cmark-gfm.h"
#include "cmark-gfm-extension_api.h"

#ifdef __cplusplus
extern "C" {
#endif

#include "cmark-gfm.h"
#include "cmark-gfm-extension_api.h"

/**
* cmark_plugin:
*
Expand Down
6 changes: 3 additions & 3 deletions src/include/registry.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#ifndef CMARK_REGISTRY_H
#define CMARK_REGISTRY_H

#include "cmark-gfm.h"
#include "cmark-gfm-extension_api.h"

#ifdef __cplusplus
extern "C" {
#endif

#include "cmark-gfm.h"
#include "cmark-gfm-extension_api.h"

CMARK_GFM_EXPORT
void cmark_register_plugin(cmark_plugin_init_func reg_fn);

Expand Down
8 changes: 4 additions & 4 deletions src/include/render.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#ifndef CMARK_RENDER_H
#define CMARK_RENDER_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdbool.h>
#include <stdlib.h>

#include "buffer.h"
#include "chunk.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef enum { LITERAL, NORMAL, TITLE, URL } cmark_escaping;

struct cmark_renderer {
Expand Down