From 60bcf84ddaa281f1e803b11a7db77d8a7f8c58c6 Mon Sep 17 00:00:00 2001 From: Yasuo Ohgaki Date: Sun, 26 Jan 2014 18:28:21 +0900 Subject: Update source docs --- CODING_STANDARDS | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'CODING_STANDARDS') diff --git a/CODING_STANDARDS b/CODING_STANDARDS index 7a0562e6ca..fccc2b873d 100644 --- a/CODING_STANDARDS +++ b/CODING_STANDARDS @@ -82,7 +82,7 @@ Exceptions: library may need to control or free the memory, or when the memory in question needs to survive between multiple requests. -Naming Conventions +User Functions/Methods Naming Conventions ------------------ 1. Function names for user-level functions should be enclosed with in @@ -163,6 +163,25 @@ Naming Conventions 'foobar' 'foo_bar' +Internal Function Naming Convensions +---------------------- + +1. Exposed module API must be named 'php_modulename_function()' to avoid + symbol collision. They should be in lowercase, with words underscore + delimited. Exposed API must be defined in 'php_modulename.h'. + + PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS); + + Unexposed module function should be static and should not be defined in + 'php_modulename.h'. + + static int php_session_destroy(TSRMLS_D) + +2. Main module source file must be named 'modulename.c'. + +3. Header file that are used by other sources must be named 'php_modulename.h'. + + Syntax and indentation ---------------------- @@ -181,9 +200,9 @@ Syntax and indentation of PHP or one of its standard modules, please maintain the K&R style. This applies to just about everything, starting with indentation and comment styles and up to function declaration - syntax. Also see Indentstyle_. + syntax. Also see Indentstyle. -.. _Indentstyle: http://www.catb.org/~esr/jargon/html/I/indent-style.html + Indentstyle: http://www.catb.org/~esr/jargon/html/I/indent-style.html 3. Be generous with whitespace and braces. Keep one empty line between the variable declaration section and the statements in a block, as well as -- cgit v1.2.1 From 76c098395df506692b1aba48ed0042cc1a27b491 Mon Sep 17 00:00:00 2001 From: Yasuo Ohgaki Date: Sun, 26 Jan 2014 18:30:25 +0900 Subject: Revert "Update source docs" This reverts commit 10d06cd4ff3038d2f02a18936793969e7aee0bda. --- CODING_STANDARDS | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'CODING_STANDARDS') diff --git a/CODING_STANDARDS b/CODING_STANDARDS index fccc2b873d..7a0562e6ca 100644 --- a/CODING_STANDARDS +++ b/CODING_STANDARDS @@ -82,7 +82,7 @@ Exceptions: library may need to control or free the memory, or when the memory in question needs to survive between multiple requests. -User Functions/Methods Naming Conventions +Naming Conventions ------------------ 1. Function names for user-level functions should be enclosed with in @@ -163,25 +163,6 @@ User Functions/Methods Naming Conventions 'foobar' 'foo_bar' -Internal Function Naming Convensions ----------------------- - -1. Exposed module API must be named 'php_modulename_function()' to avoid - symbol collision. They should be in lowercase, with words underscore - delimited. Exposed API must be defined in 'php_modulename.h'. - - PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS); - - Unexposed module function should be static and should not be defined in - 'php_modulename.h'. - - static int php_session_destroy(TSRMLS_D) - -2. Main module source file must be named 'modulename.c'. - -3. Header file that are used by other sources must be named 'php_modulename.h'. - - Syntax and indentation ---------------------- @@ -200,9 +181,9 @@ Syntax and indentation of PHP or one of its standard modules, please maintain the K&R style. This applies to just about everything, starting with indentation and comment styles and up to function declaration - syntax. Also see Indentstyle. + syntax. Also see Indentstyle_. - Indentstyle: http://www.catb.org/~esr/jargon/html/I/indent-style.html +.. _Indentstyle: http://www.catb.org/~esr/jargon/html/I/indent-style.html 3. Be generous with whitespace and braces. Keep one empty line between the variable declaration section and the statements in a block, as well as -- cgit v1.2.1 From f496aac1f6fc2b3ef30d5ed9539dbfdf9b4a1892 Mon Sep 17 00:00:00 2001 From: Yasuo Ohgaki Date: Sun, 26 Jan 2014 18:31:27 +0900 Subject: Update source docs --- CODING_STANDARDS | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'CODING_STANDARDS') diff --git a/CODING_STANDARDS b/CODING_STANDARDS index 7a0562e6ca..fccc2b873d 100644 --- a/CODING_STANDARDS +++ b/CODING_STANDARDS @@ -82,7 +82,7 @@ Exceptions: library may need to control or free the memory, or when the memory in question needs to survive between multiple requests. -Naming Conventions +User Functions/Methods Naming Conventions ------------------ 1. Function names for user-level functions should be enclosed with in @@ -163,6 +163,25 @@ Naming Conventions 'foobar' 'foo_bar' +Internal Function Naming Convensions +---------------------- + +1. Exposed module API must be named 'php_modulename_function()' to avoid + symbol collision. They should be in lowercase, with words underscore + delimited. Exposed API must be defined in 'php_modulename.h'. + + PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS); + + Unexposed module function should be static and should not be defined in + 'php_modulename.h'. + + static int php_session_destroy(TSRMLS_D) + +2. Main module source file must be named 'modulename.c'. + +3. Header file that are used by other sources must be named 'php_modulename.h'. + + Syntax and indentation ---------------------- @@ -181,9 +200,9 @@ Syntax and indentation of PHP or one of its standard modules, please maintain the K&R style. This applies to just about everything, starting with indentation and comment styles and up to function declaration - syntax. Also see Indentstyle_. + syntax. Also see Indentstyle. -.. _Indentstyle: http://www.catb.org/~esr/jargon/html/I/indent-style.html + Indentstyle: http://www.catb.org/~esr/jargon/html/I/indent-style.html 3. Be generous with whitespace and braces. Keep one empty line between the variable declaration section and the statements in a block, as well as -- cgit v1.2.1 From d65ddb633d4fef54bd9715c4a159d8a7462eed2d Mon Sep 17 00:00:00 2001 From: Yasuo Ohgaki Date: Mon, 27 Jan 2014 06:50:11 +0900 Subject: Fix English and improve by Stas. Thanks :) --- CODING_STANDARDS | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'CODING_STANDARDS') diff --git a/CODING_STANDARDS b/CODING_STANDARDS index fccc2b873d..bebc951452 100644 --- a/CODING_STANDARDS +++ b/CODING_STANDARDS @@ -166,9 +166,10 @@ User Functions/Methods Naming Conventions Internal Function Naming Convensions ---------------------- -1. Exposed module API must be named 'php_modulename_function()' to avoid - symbol collision. They should be in lowercase, with words underscore - delimited. Exposed API must be defined in 'php_modulename.h'. +1. Functions that are part of the external API should be named + 'php_modulename_function()' to avoid symbol collision. They should be in + lowercase, with words underscore delimited. Exposed API must be defined + in 'php_modulename.h'. PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS); @@ -179,7 +180,7 @@ Internal Function Naming Convensions 2. Main module source file must be named 'modulename.c'. -3. Header file that are used by other sources must be named 'php_modulename.h'. +3. Header file that is used by other sources must be named 'php_modulename.h'. Syntax and indentation -- cgit v1.2.1