From d9dd2047c5a1cbe3c6fbba368d274adff8ab944c Mon Sep 17 00:00:00 2001 From: kjdev Date: Tue, 2 Jun 2026 06:48:26 +0900 Subject: [PATCH] refactor: drop const-stripping casts in eval_ctx setter calls The upstream const-correctness fix landed via PR #2 (merge 65d68c9): php_cedar_eval_ctx_set_principal/action/resource now accept const php_cedar_str_t *. Remove the now-unnecessary (php_cedar_str_t *) casts that previously stripped const from the request arguments. --- cedar.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cedar.c b/cedar.c index f31132c..5efebdc 100644 --- a/cedar.c +++ b/cedar.c @@ -1007,12 +1007,9 @@ cedar_evaluate_request(cedar_policy_store_t *store, zval *params, return; } - php_cedar_eval_ctx_set_principal(eval_ctx, - (php_cedar_str_t *) p_type, (php_cedar_str_t *) p_id); - php_cedar_eval_ctx_set_action(eval_ctx, - (php_cedar_str_t *) a_type, (php_cedar_str_t *) a_id); - php_cedar_eval_ctx_set_resource(eval_ctx, - (php_cedar_str_t *) r_type, (php_cedar_str_t *) r_id); + php_cedar_eval_ctx_set_principal(eval_ctx, p_type, p_id); + php_cedar_eval_ctx_set_action(eval_ctx, a_type, a_id); + php_cedar_eval_ctx_set_resource(eval_ctx, r_type, r_id); array_init(&permit_ids); array_init(&forbid_ids);