Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix serveral compile warnings

  • Loading branch information...
commit 648445f124bf499b7e62dd583aa1c90ac77f017c 1 parent 2402c9e
stealth35 stealth35 authored
14 config.w32
View
@@ -1,9 +1,15 @@
ARG_WITH('sundown', 'sundown extension', 'no');
if (PHP_SUNDOWN != "no") {
- STDOUT.WriteLine("Generating Makefile");
+ ADD_EXTENSION_DEP('sundown','spl',true);
- EXTENSION("sundown", "php_sundown.c sundown_markdown.c render_base.c render_html.c render_html_toc.c render_xhtml.c", true, "-Isundown\\src;sundown\\html");
- ADD_SOURCES(configure_module_dirname + "\\sundown","sundown\\src\\buffer.c sundown\\src\\markdown.c sundown\\html\\html.c sundown\\html\\html_smartypants.c sundown\\html\\autolink.c sundown\\src\\stack.c sundown\\html\\houdini_href_e.c sundown\\html\\houdini_html_e.c", "sundown");
- ADD_EXTENSION_DEP('sundown','spl',true);
+ if (CHECK_HEADER_ADD_INCLUDE("markdown.h", "CFLAGS_SUNDOWN", "..\\pecl\\sundown\\sundown\\src") &&
+ CHECK_HEADER_ADD_INCLUDE("html.h", "CFLAGS_SUNDOWN", "..\\pecl\\sundown\\sundown\\html")) {
+ ADD_SOURCES(configure_module_dirname + "\\sundown\\src","buffer.c markdown.c autolink.c stack.c", "sundown");
+ ADD_SOURCES(configure_module_dirname + "\\sundown\\html","html.c html_smartypants.c houdini_href_e.c houdini_html_e.c", "sundown");
+
+ EXTENSION("sundown", "php_sundown.c sundown_markdown.c render_base.c render_html.c render_html_toc.c render_xhtml.c");
+ } else {
+ WARNING( "sundown not enabled: headers not found");
+ }
}
3  php_sundown.c
View
@@ -18,7 +18,9 @@
#include "php_sundown.h"
+#include "ext/standard/info.h"
+extern void php_sundown_render_base_init(TSRMLS_D);
extern void php_sundown_render_html_init(TSRMLS_D);
extern void php_sundown_render_html_toc_init(TSRMLS_D);
extern void php_sundown_render_xhtml_init(TSRMLS_D);
@@ -51,7 +53,6 @@ static void sundown__render(SundownRendererType render_type, INTERNAL_FUNCTION_P
unsigned int enabled_extensions = 0, render_flags = 0;
char *buffer;
int buffer_len = 0;
- zend_class_entry *ce;
HashTable *table;
object = getThis();
2  php_sundown.h
View
@@ -16,6 +16,7 @@
#include "ext/spl/spl_exceptions.h"
#include "zend_interfaces.h"
+#include "zend_exceptions.h"
/* Define the entry point symbol
* Zend will use when loading this module
@@ -136,7 +137,6 @@ static int call_user_function_v(HashTable *function_table, zval **object_pp, zva
size_t i;
int ret;
zval **params;
- zval *tmp;
TSRMLS_FETCH();
if (param_count > 0) {
4 render_base.c
View
@@ -283,7 +283,6 @@ PHP_METHOD(sundown_render_base, paragraph)
{
char *text;
int text_len;
- zval *buffer;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"s", &text, &text_len) == FAILURE) {
@@ -390,7 +389,6 @@ PHP_METHOD(sundown_render_base, emphasis)
{
char *text;
int text_len;
- zval *buffer;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"s", &text, &text_len) == FAILURE) {
@@ -615,7 +613,7 @@ PHP_METHOD(sundown_render_base, __construct)
PHP_METHOD(sundown_render_base, getRenderFlags)
{
if (Z_TYPE_P(zend_read_property(sundown_render_base_class_entry, getThis(),"render_flags",sizeof("render_flags")-1, 0 TSRMLS_CC)) != IS_NULL) {
- zval *result, *tmp = NULL;
+ zval *tmp = NULL;
tmp = zend_read_property(sundown_render_base_class_entry, getThis(),"render_flags",sizeof("render_flags")-1, 0 TSRMLS_CC);
RETVAL_ZVAL(tmp, 1, 0);
2  render_html.c
View
@@ -434,7 +434,7 @@ PHP_METHOD(sundown_render_html, tableCell)
char *content;
int content_len;
long alignment;
- struct buf *input, *output,*al;
+ struct buf *input, *output;
php_sundown_render_html_t *html;
php_sundown_render_base_t *base;
2  sundown_markdown.c
View
@@ -382,7 +382,7 @@ PHP_METHOD(sundown_markdown, render)
{
php_sundown_markdown_t *object = (php_sundown_markdown_t *) zend_object_store_get_object(getThis() TSRMLS_CC);
php_sundown_render_base_t *render_base;
- zval *buffer_object, preprocess, postprocess, *params[1], *ret, *render, *m_retval;
+ zval preprocess, postprocess, *params[1], *ret, *render, *m_retval;
struct buf input_buf, *output_buf;
struct sd_callbacks sundown_render;
struct php_sundown_renderopt_ex opt;
Please sign in to comment.
Something went wrong with that request. Please try again.