* 20110329.5 (2.3.13-dev) Add ap_regexec_len()
* 20110329.6 (2.3.13-dev) Add AP_EXPR_FLAGS_RESTRICTED, ap_expr_eval_ctx_t->data,
* ap_expr_exec_ctx()
+ * 20110604.0 (2.3.13-dev) Make ap_rputs() inline
*/
#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
#ifndef MODULE_MAGIC_NUMBER_MAJOR
-#define MODULE_MAGIC_NUMBER_MAJOR 20110329
+#define MODULE_MAGIC_NUMBER_MAJOR 20110604
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 6 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
AP_DECLARE(int) ap_rputc(int c, request_rec *r);
/**
- * Output a string for the current request
- * @param str The string to output
+ * Write a buffer for the current request
+ * @param buf The buffer to write
+ * @param nbyte The number of bytes to send from the buffer
* @param r The current request
* @return The number of bytes sent
*/
-AP_DECLARE(int) ap_rputs(const char *str, request_rec *r);
+AP_DECLARE(int) ap_rwrite(const void *buf, int nbyte, request_rec *r);
/**
- * Write a buffer for the current request
- * @param buf The buffer to write
- * @param nbyte The number of bytes to send from the buffer
+ * Output a string for the current request
+ * @param str The string to output
* @param r The current request
* @return The number of bytes sent
+ * @note ap_rputs may be implemented as macro or inline function
*/
-AP_DECLARE(int) ap_rwrite(const void *buf, int nbyte, request_rec *r);
+static inline int ap_rputs(const char *str, request_rec *r)
+{
+ return ap_rwrite(str, strlen(str), r);
+}
/**
* Write an unspecified number of strings to the request
return c;
}
-AP_DECLARE(int) ap_rputs(const char *str, request_rec *r)
-{
- apr_size_t len;
-
- if (r->connection->aborted)
- return -1;
-
- if (buffer_output(r, str, len = strlen(str)) != APR_SUCCESS)
- return -1;
-
- return len;
-}
-
AP_DECLARE(int) ap_rwrite(const void *buf, int nbyte, request_rec *r)
{
if (r->connection->aborted)